|
-
Sep 12th, 2001, 02:32 AM
#1
Thread Starter
Lively Member
Connection String problem
I thought that when I used this code ...
dePenlogs.Connections("cnlogs").ConnectionString = App.Path + "\" + ("Temp.mdb")
When the app would be installed on the users machine it would find the database in the apps path but it does not. It tries to find the the database in the same directory as on my machine where the app was written WHY????
All I am trying to do is have a connection to the database without going through ODBC ( the only way I have ever done it). How do I do this (I am sure very simple) thing.???
PS. May the US find the #@S H%L#S Responible for the WTC bombing and blow them away aswell!!!!!!!!!
-
Sep 12th, 2001, 03:32 AM
#2
PowerPoster
try:
dePenlogs.Connections("cnlogs").ConnectionString = App.Path & "\" & "Temp.mdb"
else
What is cnlogs?
-
Sep 12th, 2001, 03:51 AM
#3
Thread Starter
Lively Member
It works fine
No it works fine on my PC. Ok I am writting my project in this directory. C:\Projects\MyProject
Now when I install the app on another pc and try to run it. It gives me an error somthing like:
Cannot find database in C:\Projects\MyProject
Now I thought that by using the App.path statement, the project would look for the database in the app directory, which would be
C:\ProgramFiles\MyProject
-
Sep 12th, 2001, 09:22 PM
#4
PowerPoster
yeah i agree with gab!
Coz app.path should do it that way!
or perhaps:
dePenlogs.Connections "cnlogs").ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\pathhere.mdb"
-
Sep 13th, 2001, 04:48 AM
#5
Thread Starter
Lively Member
May be right on that one
I think you may be right on what you say, I do have another ActiveX ado control on one of my forms, with I set the Connection String to the DataEnviroment connection through code, but i did see that it was hardcoded in the properties on that control, I will let you know when I P&D it again
Thanks
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
|