ODBC Connection Requesting Password and Sign On

S

SHIPP

Doug Steele gave me the following bit of code to relink Access ODBC tables
programmatically. It works great.


For Each tdfCurr In dbCurr.TableDefs
If tdfCurr.Connect Like "*adage*" Then
ReDim Preserve typExistingData(0 To intToChange)
typExistingData(intToChange).TableName = tdfCurr.name
typExistingData(intToChange).SourceTableName = tdfCurr.SourceTableName
intToChange = intToChange + 1
End If
Next tdfCurr

If intToChange > 0 Then
For intLoop = 0 To (intToChange - 1)
dbCurr.TableDefs.Delete typExistingData(intLoop).TableName
Set tdfCurr = dbCurr.CreateTableDef(typExistingData(intLoop).TableName)
tdfCurr.Connect = strConnectNew
tdfCurr.SourceTableName = typExistingData(intLoop).SourceTableName
dbCurr.TableDefs.Append tdfCurr
Next intLoop
End If

The only issue I have now is that there are 400+ tables and the Driver stops
at each one to request a password and sign on. Is there a way to feed this
information for the linking process only. I believe the request for this
information is happening at the following statement:

dbCurr.TableDefs.Append tdfCurr

Thanks for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top