Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cat.tables.append problem. One call of this is producing 3 attempts

Status
Not open for further replies.

daddypost

Technical User
Oct 21, 2004
98
US
I've got a large module which get a password and user ID string from a remote file. Everytime the database is opened the code runs and relinks the tables that are connected to sybase(as we change passwords frequently, this is the best way to not have to touch every database when there is a change). We just implemented a locking scheme when a user enters a wrong password more than 6 times. The problem we are having now is when the code CAT.TABLES.APPEND is called for a specific table it is returning one successfull relink, and two failed password attempts. Here is a snippet of the code being used. The new password and user ID have already been inserted into the connection string and the old password is no longer available to the string.

Tbl.Properties("Jet OLEDB:Create Link") = True
Tbl.Properties("Jet OLEDB:Cache Link Name/Password") = True
Tbl.Properties("Jet OLEDB:Link Provider String") = LinkString
Tbl.Properties("Jet OLEDB:Remote Table Name") = RS.Fields.Item("RemoteTableName")

'Clear the Err object of old errors.
Call Err.Clear

'Turn error-handling on.
On Error Resume Next

'Link the table to the mdb.
Cat.Tables.Append Tbl

I cannot see why this is happening, and maybe without you seeing the entire code, you might not be able to either. But if you have any ideas, I could really use them. We have over 200 databases that are called on throughout the week, and none of them with 3 or more tables will work due to the new locking issue. SOX SUX. Anyway, thank you in advance.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top