ADO Connection Object

preethi

Registered User.
Local time
Yesterday, 16:09
Joined
Nov 5, 2007
Messages
30
Hi All,

I have created a time sheet application for our company. I have kept the Master Database in on of the folders in Server. There is a linked database of the same, which contains all the forms & reports call the "Time sheet". It contains a module with a procedure that allocates the ADODB connection object with the database. The coding is given below.

Set cn = New ADODB.Connection
cn.Provider = "Microsoft.Jet.OLEDB.4.0"
cn.Open "\\Afs471-ae001\yeu common\MANHRS\Time Sheet\TimeSheet.mdb"


"Time Sheet " database is on my personal PC & the MDE file of the same I have kept on the server in another location. So people can copy the MDE file & put it in there desktop & they can use the application.

But now our head office needs the same application. I'm planning to give the Master databse & the MDE file not the code. But in that case the connection object will make problem.

Please help me to how to sort out this issue?

Regards

Preethi Renjith
 
Hi All,

I have created a time sheet application for our company. I have kept the Master Database in on of the folders in Server. There is a linked database of the same, which contains all the forms & reports call the "Time sheet". It contains a module with a procedure that allocates the ADODB connection object with the database. The coding is given below.

Set cn = New ADODB.Connection
cn.Provider = "Microsoft.Jet.OLEDB.4.0"
cn.Open "\\Afs471-ae001\yeu common\MANHRS\Time Sheet\TimeSheet.mdb"


"Time Sheet " database is on my personal PC & the MDE file of the same I have kept on the server in another location. So people can copy the MDE file & put it in there desktop & they can use the application.

But now our head office needs the same application. I'm planning to give the Master databse & the MDE file not the code. But in that case the connection object will make problem.

Please help me to how to sort out this issue?

Regards

Preethi Renjith

How about creating a table which can have one field and one row which the location is input. You can have a form that manages it (set to AllowEdits but NOT AllowAdditions). Then you can use a DLookup to get the actual string for the connection path. That way they can set the path for theirs and you can set the path for yours and if it ever changes you can make the change very easily without having to recode things.
 

Users who are viewing this thread

Back
Top Bottom