Originally Posted by
ramesh
I have a program(me) connected to an Access database via ODBC32 using a DataEnvironment designer (deODBC) and connection (connODBC). User logs in before using programme works fine. This programme is to be used with multiple databases (log out from one and connect to another). Right now, the only way to switch database is to start the program again. The code I've used to do this does not work:
--------------------------------------------------------
Private Sub cmdChLocation_Click()
deODBC.conODBC.Close
deODBC.conODBC.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;Mode=Read"
deODBC.conODBC.Open
End Sub
---------------------------------------------------------
Any idea where I'm going wrong?
Ramesh