Advertisement

02.08.2006 at 11:08AM PST, ID: 21728961
[x]
Attachment Details

Linking Microsoft Access to Oracle ODBC datasource in VBA.  Error exceeded maximum connect time.

Asked by shawnmoyer in Microsoft Access Database

Tags: , ,

I have constructed the connection string below in order to connect to an ODBC datasource.  The problem is, my program exceeds the maximum connect time.  In order to reconnect I have to quit MS Access and restart the program.  I am running a series of individual queries as follows:

ODBC query 1
other query 1
ODBC query 2
other query 2
....
....
ODBC query n
other query n

Where n = ~20

These queries have to be run in order.
What i want is to completely disconnect from the ODBC datasource after every ODBC query and reconnect them again.  I can delete the linked table but i am unable to completely close the link with the server.  How can i completely close the link with the server without closing my application?

here is my connection string:

<<<<begin>>>>
Dim DBS As Database
Dim RST As DAO.Recordset
Set DBS = CurrentDb
Set RST = DBS.OpenRecordset("P_Login")
Dim FLD_pass As DAO.Field
Dim FLD_Log As DAO.Field
Set FLD_pass = RST.Fields("Password")
Set FLD_Log = RST.Fields("Login")

If RST.RecordCount = 0 Then
Exit Sub
End If

RST.MoveFirst
Dim tdflinked As TableDef
Dim strUserid As String
Dim strUserpwd As String
strUserid = FLD_Log
strUserpwd = FLD_pass

    For i = 0 To DBS.TableDefs.Count - 2
    If "TABLENAME" = DBS.TableDefs(i).Name Then
        DBS.TableDefs.Delete (DBS.TableDefs(i).Name)
    End If
    Next i
Set tdflinked = DBS.CreateTableDef("TABLENAME")
tdflinked.Connect = "ODBC;DSN=InfoCtr;UID=" & strUserid & ";PWD=" & strUserpwd & ";SERVER=X007.ORACLEDB.C.COM;"
tdflinked.SourceTableName = "TABLENAME"
DBS.TableDefs.Append tdflinked
RST.Close

<<<<end>>>>

Thanks,
Shawn
Start Free Trial
[+][-]02.08.2006 at 11:40AM PST, ID: 15905819

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.08.2006 at 12:03PM PST, ID: 15906044

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.08.2006 at 12:07PM PST, ID: 15906083

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.08.2006 at 02:16PM PST, ID: 15907448

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.09.2006 at 03:50AM PST, ID: 15911703

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.09.2006 at 03:51AM PST, ID: 15911707

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.09.2006 at 05:44AM PST, ID: 15912422

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.09.2006 at 08:16AM PST, ID: 15913931

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Access Database
Tags: oracle, odbc, vba
Sign Up Now!
Solution Provided By: TommyTupa
Participating Experts: 2
Solution Grade: A
 
 
[+][-]02.09.2006 at 12:01PM PST, ID: 15916011

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.09.2006 at 02:05PM PST, ID: 15917233

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.10.2006 at 03:57AM PST, ID: 15921546

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]03.20.2006 at 12:16PM PST, ID: 16240100

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]03.25.2006 at 01:38AM PST, ID: 16287483

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32