Correct me if I am wrong. I would like to know how it works. I would greatly appreciate if you can read the detailed post. I am trying to explain my questions as clearly as possible.
Access, by default, is a multi-user platform. Is it correct?
I have a login form which will ask user to provide username/password (when user opens the Access file).
I have only one table inside Access (three fields: Computer_name, Username, Password). All other tables are in the back end Sybase database, those tables are already linked to Access manually. Let us say, when I build the application, I manually link the Sybase tables but did not save my password in the Access file. That being said, the program needs to use user provided Username/Password to re-connect the linked table. Since it is multiple user platform, if Mike is the first person opening the file (log in), program use his Username/Password to re-connect all linked tables, how to write the code? I only know below code to link a new table, which is not exactly what I need. I think if I don't save my password there(I use my Username/Password to link the back end tables, then close the Access file), the linked table should lost connection. Whoever opens the file next time, the program will need his/her Username/Password to re-connect to back-end Sybase tables. I have verified that: when I use below code the link Sybase table to Access, then close and save the file, when I re-open the Access file, if I try to open the linked table, a window pop up for my Logon ID/Password. In this case, how to write the code to pass user's Username/Password to re-connect the linked table? The other way to go around it: I realize if I use acLink to link one un-needed table, then all the previously-linked tables are re-connected(as long as all other tables are from same Sybase database), then I go ahead and delete the un-needed table. It seems working, but the method is silly.
If Mike is the first person opening the file, the program uses his Username/Password to re-connect to Sybase back end tables. A moment later, Jennifer opens the same Access file, while Mike is still opening the file. Since the back-end tables are already connected via Mike's Username/Password. At the time point when Jennifer opens the file, does she open the file (saved by developer without password for linked table) or open the file already linked by Mike? Does the Access application needs to use Jennifer's Username/Password in order for her to run some programs(interacting with Sybase) in the Access application.
I am not sure if I make my questions clear. Let me know if you have any questions regarding my questions.
Thanks.
Code:
DoCmd.TransferDatabase acLink, "ODBC Database", _
"ODBC;DSN=DataSource1;UID=User2;PWD=www;LANGUAGE=us_english;" _
& "DATABASE=pubs", acTable, "Source Table Name", "HelloWorld", False, True