about dbase path in a connectionstring!?

hi there i have a problem regarding dbase path (i used dbase wizard) where can i find it

because dbase wizard is the easiest and fastest the connect to the dbase and u can choose either detailed or gridview....but my problem is where can i edit the dbase path (C:\Windows\dbase\mydbase.mdb) because when i install my program to another PC the path of dbase was in (C:\windows\dbase\mydbase.mdb) i want is to share a folder in my PC(where my dbase is) and change the dbase path of my program and so that when i install it again to another PC(s) they can acces to my dbase (\\mypc\dbase\mydbase.mdb)... or there is any way to bound the items of the database thru textboxes, rich textbox, masked textbox, and combobox.....using code




Answer this question

about dbase path in a connectionstring!?

  • HCTwinJava

    to edit the database path, look in the 'app.config' file in your project. there you can actually change the path to refer to your computer as the server and you will be able to share your Db with other computers that have your program installed. Hope this helps.

    Matt


  • Shawnk

    In your IDE, you can also open the project Settings and you can modify the connectionstring. You can also put a database maintanance in your project, by using a textbox which will handle your database connection. In this way you can have flexibility on your connection string even after the project has been compiled.

    Consider this,,,,,,,, My.Settings.NameofConnection = connectionstring
    don't forget to add My.Settings.save and My.Settings.reload to make the changes

    I hope I am right.... :-()


  • Glint

    There are many ways to edit the connection string. For example:

    in the Form_load sub, you typically get a code listed as such:

    Me.tableadapter1.Fill(Dataset.[table])

    right above that line, you can add this code:

    Dim myConnection as new System.Data.Oledb.OledbConnection(connection string as string)
    Me.tableadapter1.Connection = myConnection

    Then no matter what the 'wizard' set the connection to, it will change to your connection as your form loads, then fill you dataset properly.

    If you have alot of connection strings that need to be changed to the same dBase, then you could create a module that contains a public myConnection and you can more easily change the connectino string there, and have it update through out the whole program.




  • Docpro777

    what do u mean put a textbox as a dbase maintanance provide some example....please....

  • about dbase path in a connectionstring!?