|
-
Oct 29th, 2000, 12:24 PM
#1
Thread Starter
Addicted Member
ok ok
could somebody tell me what's I mean why is this.
I have a dataenvironment that connects to an access db called test.mdb.
I already have recordsets there.
now, at run time, I want the access db file to be dynamic but with the same structure.
so test.mdb is the same as another.mdb
so in the Main sub,
NOTE: equals is used here to symbolize the real equal sign. (sorry my internet pc keyboard's equal sign does not work. but it does in my Notebook)
I have:
with deTest.conTest
.properties("Data Source").value equals (see NOTE remember) "d:\test\another.mdb"
end with
When I access the recordsets, it still accesses the test.mdb which was the one I used to create my recordsets. (get it?)
what i did to make around,
dim strCon as string
with deTest.conTest
.properties("Data Source").value equals (see NOTE remember) "d:\test\another.mdb"
strCon equals .ConnectionString
.ConnectionString equals strCon
end with
VOILA! it works already. it now accesses the another.mdb
HHHHMMMMMM.....
When I connect to SQL server though, I don't have to work around with it.
[Edited by RIVES on 10-29-2000 at 12:30 PM]
-
Oct 30th, 2000, 11:43 AM
#2
Lively Member
I don't see any .open or .refresh
-
Oct 30th, 2000, 11:50 AM
#3
Thread Starter
Addicted Member
it does not have to have one.
this code is for the initializationi on where the system would connect. what database the user would use. since the dataenvironment declinic is a global object, setting its connection properties should be used by all the recordsets in it.
I usually do this in a SQL server database. when you have the same schema on two databases (production and test databases) so that the user would choose what database to connect to.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|