Difficulty Connecting ODBC Drivers

Mar 21, 2005

In the Access application that I have developed for a user, the application is supposed to establish the ODBC connection to an external database when the application is initiated. On my PC, the application works. On an older PC, the application works. However, on the User's PC and on the new one that we are building for her the linking to the external tables does not work. I have displays for the tables that she is to link to as the program is doing the linking. Sometimes, on the PC for her use, the first table will not link and the rest will. Sometimes, none of the tables will link. Sometimes, the first half will link and the second half won't. I am stymied. Below is the logic that I use to make the connections at the beginning of the process. Any suggestions?


Dim strTable As String

On Error GoTo Assign_Error

'MsgBox ("Click on OK and Please be Patient as the program links to PeopleSoft tables.")

' NOTE : Do not unlink the tables as you will have to manually relink the tables

strTable = "ps_comp_ratecd_tbl"
Call unlink_table(strTable)
Call link_table(strTable)
strTable = "ps_current_job"
Call unlink_table(strTable)
Call link_table(strTable)

strTable = "ps_names"
Call unlink_table(strTable)
Call link_table(strTable)
strTable = "ps_tl_compleav_tbl"
Call unlink_table(strTable)
Call link_table(strTable)

strTable = "ps_tl_empl_data"
Call unlink_table(strTable)
Call link_table(strTable)
strTable = "ps_tl_trc_tbl"
Call unlink_table(strTable)
Call link_table(strTable)

strTable = "ps_tl_tskprf_detl"
Call unlink_table(strTable)
Call link_table(strTable)

Assign_Exit:
Exit Function

Assign_Error:
MsgBox Error$
MsgBox Err
Resume Assign_Exit

End Function
Function link_table(strTable As String)
Dim dbs As Database
Dim tdfLinked As TableDef
Dim strDatasource As String
Dim strDatabase As String


On Error GoTo Link_Error

DoCmd.OpenForm "Message"
[Forms]![Message].SetFocus
[Forms]![Message]![Message] = "Linking Table " & strTable
[Forms]![Message].Repaint

strDatabase = "HR8PROD"
strDatasource = "PS_Payroll"
strTable = UCase(strTable)

Set dbs = CurrentDb
Set tdfLinked = dbs.CreateTableDef(strTable)

' tdfLinked.Attributes = dbAttachSavePWD
' Check to see if table already exists and if it does then do nothing
' For Each tdfLinked In dbs.TableDefs
' If tdfLinked. = strTable Then
tdfLinked.Connect = "ODBC;UID=sysadm;PWD=sysadm;DSN=" & strDatasource & ";"
tdfLinked.SourceTableName = strTable
tdfLinked.Attributes = dbAttachSavePWD

dbs.TableDefs.Append tdfLinked
DoCmd.Close acForm, "Message"
' Exit Function
' End If
' Next
' [Forms]![Message].SetFocus
' [Forms]![Message]![Message] = strTable & " Not Found for Linking"
' [Forms]![Message].Repaint

' DoCmd.TransferDatabase acLink, "ODBC Database", "ODBC;DSN=PS_Payroll;UID=sysadm;PWD=sysadm;DATABASE =HR8PROD", acTable, "SYSADM." & UCase(strTable), strTable

Link_Exit:
Exit Function

Link_Error:
' if the error is simply that the item to delete isn't actually
' there to delete, we want to skip it.
If Err = 3265 Then
Resume Next
End If
' otherwise we want to show what the error is, and then exit.
MsgBox Error$
Resume Link_Exit

End Function

Function unlink_table(strTable As String)
Dim dbs As Database

On Error GoTo Unlink_table_Error

Set dbs = CurrentDb
dbs.TableDefs.Delete strTable

Unlink_table_Exit:
Exit Function

Unlink_table_Error:
' if the error is simply that the item to delete isn't actually
' there to delete, we want to skip it.
If Err = 3265 Then
Resume Next
End If
' otherwise we want to show what the error is, and then exit.
MsgBox Error$
Resume Unlink_table_Exit

End Function

View Replies


ADVERTISEMENT

ODBC Drivers Error '80004005'

Jul 6, 2005

while updating the databse on the server using a ftp client
users get the following error on asp page.

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key
'Temporary (volatile) Jet DSN for process 0xf7c Thread 0x194 DBC 0x899e70c Jet'.
/myscript.inc, line 25

line 25 has no error except the following code:
conn.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath

Is there anyway to check if a connection can not be established or the database is being updated
asp page sends friendly message to user that the database is being updated or temporary down or please try again in few seconds.

Any help and idea will be highly appreciated in advance

John

View 1 Replies View Related

Microsoft OLE DB Provider For ODBC Drivers (0x80004005)

Feb 24, 2004

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x818 Thread 0xa74 DBC 0x5f5c1024 Jet'.

I get the above error when I run my login form can anyone help? it points to the code below

<% Response.Buffer = true %>
<%
Session("DatabasePath") = "MoneygallGAA.mdb"
If Request.Form("btnLogin") = "Login" AND Request.Form("txtName") <> "" _
AND Request.Form("txtPassword") <> "" Then

'-- Declare your variables
Dim DataConnection, cmdDC, RecordSet
Dim RecordToEdit, Updated, strUserName, strPassword

strUserName = Request.Form("txtName")
strPassword = Request.Form("txtPassword")

'-- Create object and open database
Set DataConnection = Server.CreateObject("ADODB.Connection")
DataConnection.Open "DRIVER={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & Session("DatabasePath") & ";"

Set cmdDC = Server.CreateObject("ADODB.Command")
cmdDC.ActiveConnection = DataConnection

'-- default SQL
SQL = "SELECT * FROM Login"

If Request.Form("txtName") <> "" Then
SQL = "SELECT Login.* FROM Login " & _
"WHERE Login.userID='" & strUserName& _
"' AND Login.password ='" & strPassword & "'"
End If

cmdDC.CommandText = SQL
Set RecordSet = Server.CreateObject("ADODB.Recordset")

'-- Cursor Type, Lock Type
'-- ForwardOnly 0 - ReadOnly 1
'-- KeySet 1 - Pessimistic 2
'-- Dynamic 2 - Optimistic 3
'-- Static 3 - BatchOptimistic 4
RecordSet.Open cmdDC, , 0, 2

If Not RecordSet.EOF Then
Dim struserLevel
struserLevel = RecordSet.Fields("userLevel")
Session("userLevel") = struserLevel
Else
'The user was not validated...
'Take them to a page which tells them they were not validated...
Response.Redirect "default.htm"
End If
End If
%>

View 2 Replies View Related

Connecting To ODBC Through ASP

Jul 18, 2005

Hello All,

I'm somewhat new to working with ASP and very new to databases, MS Access, and SQL.

What works is opening my .mdb file, which connects through an ODBC DSN to get dynamic data. Nothing fancy.

What I'm trying to do is create a web interface via ASP to access certain data and fields in the db.

Here are the super-noob questions...Do I need a version of MS Access and the .mdb file on my webserver (where the .asp file is)? I don't have the ODBC DSN set up on the webserver (which is linux). Does that need to be done before anything will work?

Let me know if code snips would be of any assistance. Thanks much, in advance!

-K

View 3 Replies View Related

Access Crashes Connecting To Odbc

Aug 16, 2006

I've just set up my Access on a new PC and now when I try to connect to my MySQL database through odbc, Access crashes without any error messages, just the standard microsoft error reporting message.

I'm using Office 2003. What do I do??

View 1 Replies View Related

Barcode Scanner Drivers

Nov 25, 2005

Help!!
Does anyone know where I can obtain a driver for a barcode scanner that has model details:

Metrolgic MS951 KB Wedge

If anyone knows a specific website that has the drive it would be much appriciated if you could post it here.

Many thanks

Regards
Jason_Hyde

View 1 Replies View Related

Report Difficulty

May 9, 2007

I have a simple database that has in the same record in a table 3 fields of last names that are populated by entering the data in a form. There could be the same last names in each of the 3 fields. (ie; John Doe, Mary Doe, Little Doe) My problem is that I want to make a report by clicking on a button searching by the last name (Doe) and consider each of the 3 last names in my search criteria. Does anyone know how this can be accomplished as not to miss any of the (Doe's in this case)? Please help if you can I know it sounds confusing.

Thanks in advance for any help!

View 5 Replies View Related

Difficulty Answering Questions

Jan 19, 2008

I am finding it more and more difficult to answer questions lately, is it just me or has the quality of the questions gone down?

In some cases it appears that the "question" is more of a request to have something done for them than actually trying to solve a problem that they are having with a learning process.

Has anyone else noticed this or is it just me?

View 11 Replies View Related

Difficulty Creating Code

Apr 8, 2007

I am having difficulty creating code that will compare a date in one table (or query) in the [Expire] field and subtracting two months from the date and automatically placing the newly calculated date into the table (or query) in the [Notify Expiration] second field. For example:

Expire Notify Expiration

01/01/2007 11/01/2006
02/01/2007 12/01/2006
03/01/2007 01/01/2007
04/01/2007 02/01/2007
05/01/2007 03/01/2007
06/01/2007 04/01/2007
07/01/2007 05/01/2007
08/01/2007 06/01/2007
09/01/2007 07/01 2007
10/01/2007 08/01/2007
11/01/2007 09/01/2007
12/01/2007 10/01/2007

Please note that for the month of January and February, the subtraction is minus two for these two months and the subtraction is minus one for the year. All other subsequent months just subtracts two for the months leaving the year intact.
I would appreciate any help that will progmatically accomplish these calculations.

Thanks

Charles Moery
Keypounder2@aol.com

View 4 Replies View Related

Difficulty In Opening An Existing Form

Sep 9, 2004

I am having trouble with opening an existing form in ms access. Any idea what could be the problem?
Even if I am not able to retieve the whole form is there a way I can retrieve all the event procedures associated with the form?

Would appreciate any pointers.

Thanks in advance.

GreetInfo

View 8 Replies View Related

Difficulty Getting External Data In Access 2007

Feb 2, 2007

Hi There,

I have recently upgraded from Office XP to Office 2007. I had an Access database which worked fine in Access XP. In it I had a table linked to an Excel spreadsheet. When I entered data on an access form, it updated the Excel spreadsheet [source document] accordingly. This does not seem to work in Access 2007. The linked table option now does not permit data entry or amendement. The other "Get external data" options create a table in Access which also does not update my source Excel document. The idea is to enter data in Access using a form. This data is placed in an excel spreadsheet. Excel gets some lookup values, and then enters these in a Word mail merge. Without the functionality of a linked table and data entry, I cannot produce new reports.

Can anybody help please?

Regards

Mark M.

View 2 Replies View Related

Difficulty Combining Insert Into Or Select Into With A Union, Please Help!

Jan 23, 2007

I am having difficulty getting a query to work, there's probably something really simple I'm missing. . . I can get the Union function to work but I can't get it to create a table for me. The basic query looks like this:

INSERT INTO test
SELECT * FROM [Design] WHERE (Design.CID Not Like "*-*")
UNION
SELECT * FROM [Release] WHERE (Release.CID Not Like "*-*")

It works fine and shows me the table I want without the first line, but I would like it to input into a new or existing table. Any help would be greatly appreciated!

View 1 Replies View Related

Difficulty Creating Form – Possible Relationship Problems

Jul 26, 2005

Hi, I’m having a problem creating a form for easy data entry. Let me give you a little background. I have a database for a tutor program, students request a tutor for a class, and then I fill out a follow up report to find out if they are being tutored or changed their minds. Next I enter the contact information indicating the date and time of their tutoring session.

Students can be tutored in more than one class but they can only have one tutor for each class.

I have a form where I enter the tutor request info and sub forms for their classes, follow ups, and sessions. Ideally I would also like a form just to enter the session info. I want a combo box to select the tutor and then a sub form to select the tutee with a combo box which will auto fill the Subject, and Course fields, and field to enter the date and contact hrs.

I think the problem is with my relationships. I’m just kind of stuck. I think I need to create a form based on a query but I haven't done that before. Any help would be appreciated. Attached is a screen shot of my relationships and of my current form for your reference.

THANKS!!!!

View 1 Replies View Related

Connecting A Document

Jun 23, 2005

Is it possible to connect a Document to the Access Database. To have a button beside the field in the form allowing you to browze and connect the document. If not does anyone have a way around this. Any help would be well appreciated.

Shane

View 1 Replies View Related

Connecting To MS-SQL Server

Mar 25, 2006

Hi
We have a database implemented in MS-SQL server 2000 on a local machine. I want to use some of tables in my access (or excel) program. Can I link to the table?

Thanks

View 1 Replies View Related

Connecting Tables

Apr 8, 2008

I'm having a problem in Access where I'm trying to connect 2 tables together.
On one table is all the information of the person, the other table is a list from 1-50. That list is a drawing of all the peoples ID number for a drawing. When I type in their ID next to what order they got picked in is there any way where All of their information comes with that ID number they have? I really need help on this.

View 2 Replies View Related

Connecting Queries

Jul 21, 2007

Hi there, I'm currently writing an accounting system and i got stuck with this section of trying to produce the account name in a query.

i have four tables

tblPurchase
PurchaseID -Number

tblAccounts
AccountID - Number
AccountName - Text, usually has names like asset, cost of sales, expense, telephone, electricity, etc...

tblItems
ItemID, Number
AssetNum (tblAccounts.AccountName foreign key1), Number
ExpenseNum(tblAccounts.AccountName foreign key2), Number
IncomeNum(tblAccounts.AccountName foreign key3), Number

tblPurchaseLines
PurchaseNum (foreign key for tblPurchase.PurchaseID), Number
ItemNum (foreign key for tblItems.ItemID), Number




My question is how can i generate the query with the following fields:

PurchaseID
ItemID
AccountName of AssetNum
AccountName of ExpenseNum
AccountName of IncomeNum

I am aware that the query would produce three PurchaseID's for every ItemID it would encounter for every PurchaseLine.

Please point me in the right direction.

View 2 Replies View Related

Connecting To Database

Jan 17, 2005

i need help connecting to an access database using java.
any help with this would be great because i am lost.

View 2 Replies View Related

Connecting Tables

May 27, 2005

So, here's my problem: I'm doing a database on my DVDs, and I wanted to add as much info as I can about them. But I have some problems with "actors", as you know one actor can be in several movies and one movie has several actors.

I want to put the actors in their own table and movies in their own. I know how to link them together, but I don't know how to link them together so that actors could be in more than one movie and movie could have more than one actor.

Hope that even someone understands my question since my english ain't so good..

View 3 Replies View Related

Connecting Three Tables Together

Jan 10, 2014

I work in an office where we do testing with clients . I want to create a database that can create a unique report for each client on the testing results.I envision a database with at least three tables. The first table would be client demographic information with a unique ID field (CID). The second table would be the Appointment information (date, referral source, etc.). The third table will have the test results (although I'm wondering if I should have a table for each test).

Sometimes, we see clients more than once, and so need the ability to have more than one appointment record for each client. For each appointment, we would record test results.I have created a one-to-many relationship between the Client Demographics and the Appointment tables. When I created the form for the Client Demographics, I inserted a subform for the Appointment. That works great. The CID automatically transfers to the Appointment record and instantly connects the two.How do I connect the Test Results table so that the CID automatically transfers to the Test Results record as well as the Appointment Date field from the Appointment Table.

View 3 Replies View Related

Connecting To MySql From Access

Feb 26, 2006

Hi all,

hope someone can help me with this.

Before we moved webhosting company we could have external access to our MySql database which was great as our MS Access system would periodically pull data from our MySql site (namely customer enquiries which were entered via a form on our website) and dump them in our MS Access live quotes table all automatically.

With our current host (which seems to be the norm from my web-searches) they only allow local access to the MySql system.

My question is, how can I oversome this hurdle without having to move hosting company. I really don't want to move again as it's a real pain.

All suggestions welcome.

ahrint

View 2 Replies View Related

SQL Date Nightmare Connecting Via JET

Mar 19, 2008

Greetings,

I'm using flash mx and MDM zinc which i assume connects using the JET rather than ADO database engine.

For the life of me cannot get a simple update to work due to the dates
involved, lost count how many hours have gone by trying!!!

Within access I can easily switch quotes and hash symbols and all SQL THREE SQL queries work without problems on my database i.e.

UPDATE UserOverallResults
SET Results = 20
WHERE UserName ='Robbie'
AND Quizdate= '19/2/2008 12:15'

UPDATE UserOverallResults
SET Results = 20
WHERE UserName ='Robbie'
AND Quizdate= "19/2/2008 12:15"

UPDATE UserOverallResults
SET Results = 20
WHERE UserName ='Robbie'
AND Quizdate= #19/2/2008 12:15#

Within the database the fields are defined as :-
Results (Integer) Username (Text) and QuizDate (Date/Time) within MS ACCESS DB schema.

in Flash MX TextDate param is a STRING and All parmaters are populated appropriately (see this later in error message).

Example of existing date data stored in database in format "19/02/2008
16:48:11" as a DATE/TIME field.

My code within in flash is :-

mdm.Database.MSAccess.runQuery("UPDATE UserOverallResults SET Results = " +
UserScore + " WHERE UserName = '"+ UserName +"' AND QuizDate = '" +textDate
+ "' ");
I've tried with and without Hashes still no joy ..

mdm.Database.MSAccess.runQuery("UPDATE UserOverallResults SET Results = " +
UserScore + " WHERE UserName = '"+ UserName +"' AND QuizDate = Format( '"+
textDate +"', "#yyyy\-mm\-dd hh:nn:ss#")");
The error message I get from the code above is ..

SQL Query has failed for the following reason: Data type mismatch in
criteria expression SQL statement: UPDATE UserResultsOverall SET Results =
30 WHERE UserName = 'd' AND QuizDate = Format('19/2/2008 19:4:35'
,"#yyyy-mm-dd hhnss#")

My text string removes the leading zeros not sure if that would cause an
issue or not (its doesnt in MS ACCESS running query) ...

Anyone have any ideas??? Losing my mind here !!

PS I had problems using '&' instead of '+' to concatenate fields.

Cheers
Rob

View 11 Replies View Related

Connecting Records From Two Different Tables

Apr 14, 2008

is there a possibility to connect two different databases??? I mean is, I have a table called PERSON. under PERSON, there are fields called PERSON NAME, BIRTHDAY and ADDRESS. another table is called SEMINARS, under it are DATES FROM, DATES TO and TITLE.

I want to combine one of the records in PERSON to the 5 records in the SEMINARS. is there a possibility to do that???

to include in the information, there are 10 records in the PERSON and there are 75 records in the SEMINARS. and I want to add more records in SEMINARS in any of the records in PERSON in the near future.

View 1 Replies View Related

Connecting Cells/Fields

Aug 4, 2007

Hello,

how do you connect fields from one table to another? what im trying to do is to connect two fields from product! product id and order details! product id. the one in the order details table should equal whatever i input in the product table.

View 5 Replies View Related

Connecting Data Basess

Apr 14, 2007

HI

A school table is there in old and new data base,
if i give school key as 001 (which is the column of school table) i need to compare old database school table "001 key" and new database school table
"001 key" and if it is not matched it should be displayed.
Please give me detailed dicription with example.

thanks

View 1 Replies View Related

Access 2K Manualy Connecting........

Feb 22, 2005

Hi there,

I have a little problem: And hope somebody can give me an answer.

I have two tables, one form and on the form I have two textboxes. One of the textboxes should be connected to ONE table and field, and the other textbox to the OTHER table and field.

I tryed to conect through the expression builder but had not much luck! See code below.


This code comes up in the ControlSource property section and textbox also:
=[tbl_CompanyContact]![CompanyPhoneNumber]
=[tbl_PrivateContact]![PrivatePhoneNumber]


Where do I set in properties the connection to different tables i.e. tbl_CompanyContact / tbl_PrivateContact and where the connection to the field CompanyPhoneNumber / PrivatePhoneNumber.

Thanks aktell

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved