0
Private strConnection As String = _
  "Provider=Microsoft.Jet.OLEDB.4.0; " & _
  "Data Source= C:\Users\KISH\Documents\Visual Studio 2008\Projects\Final Year Project Learning program with HCI\Final Year Project Learning program with HCI\Database2.mdb;Persist Security Info=False"

the porblem i have is if i send this porgam to anthoer computer, the program will not work. how do i re write this code so it can be used on another system.?

Thank for any help

4
Contributors
6
Replies
7
Views
7 Years
Discussion Span
Last Post by vbhelp
0

Is your datasource copied to the exact same location on the other computer? As stated in your code. That may be your problem; however without knowing abit more about the error/s its throwing i cannot really think of anything else to suggest.

Hope this helps.

0

Hi, the code is not same on theother pc. i know there was away to but the file in the root folder so it can be used by others. i need to sudmit my work to my tutor so it can be used on her PC, but i know this code will not work

0

Sorry i think i didnt explain my last post correctly. i need to code the string above so it can be used on any computer without the user having to change the location, as the porgram will be burnt on to a CD and intsalled on to a computer.

0

The Connection String you are using is referring to

C:\Users\KISH\Documents\Visual Studio 2008\Projects\Final Year Project Learning program with HCI\Final Year Project Learning program with HCI\Database2.mdb

If the database location on your tutor PC is located on Root , change the path to c:\Database2.mdb , if it is going to be in a directory on the C: drive , change the connection string accordingly ( c:\DirectoryName\Database2.mdb ) , if it is in the same location as the EXE file would be , just use the access file name ( use the relative path )

0

Thank you i think that make more sence, when u think about it, the soultion is very simple. thank you again.

0

Hi, I am using visual Studio 2008. How can I add an OleDb connection in my project?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.