database connection

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi guys

im developing a desktop application that conect to a database, and that
database file is in the application development folder, and i made a
dataset
that conect to it but after packaging and installing on client pc the
database path will change so haw can i handle this problem ? i use VS 2005
and the lamguage is VB.NET


Ammar S. Mitoori
IT Head QIMCO Co.
Tel : +9744831199
Mobile : +9745378400
Fax : +9744831643
 
Pure Heart,

Is it a dontknow database or another, this makes the difference you know?

As you describe it it is Jet but before we are creating a long thread with
misunderstanding.

:-)

Cor
 
hi Core

I use Access 2003 will that be enough or what ?
thanx

--
Ammar S. Mitoori
IT Head QIMCO Co.
Tel : +9744831199
Mobile : +9745378400
Fax : +9744831643
 
hi cor

I know that statment but the point is if i have a dataset already bounded to
a database through a connection, whats the right code or way to rebind it
using the last statment and will that effect the bounded controls or not ?

thank you
--
Ammar S. Mitoori
IT Head QIMCO Co.
Tel : +9744831199
Mobile : +9745378400
Fax : +9744831643
 
Pure Heart,

You can set the connection string at any moment in your OleDB
command.connection or in the property from that in the OleDB dataadapter.

I hope this is clear, otherwise reply

Cor
 
hi cor

yes it help but 1 last thing, i chosed not to save the connection inside the
project explorer so the connection is only available in server explorer, i
didnt save it cuz it makes a local copy of the database and this will make a
copy of databse each application run and all updates will be made to that
copy in memory so can i modify connection properties even if i didnt save it ?

--
Ammar S. Mitoori
IT Head QIMCO Co.
Tel : +9744831199
Mobile : +9745378400
Fax : +9744831643
 
Ammar,

Do you use a dataadapter, tableadapter or a straight command?

(Than I can show you tomorrow an example, I don't think there is time
anymore)

Cor
 
hi cor

i make a dataset from a connection i made it through database server explorer
then i bond the datanavigator to that dataset, conecting to one of its
tables, when i do that it will create for me table1bindingsource and
table1tableadapter which i use them to push updates to database thats all )

thank you cor

--
Ammar S. Mitoori
IT Head QIMCO Co.
Tel : +9744831199
Mobile : +9745378400
Fax : +9744831643
 
Ammar,

You can get your connection with as sample the Northwind Orders table.

Dim conn As OleDb.SqlConnection = Me.OrdersTableAdapter.Connection
conn.ConnectionString = "blablabla"
That you can than change.

I hope this helps,

Cor
 
¤ hi guys
¤
¤ im developing a desktop application that conect to a database, and that
¤ database file is in the application development folder, and i made a
¤ dataset
¤ that conect to it but after packaging and installing on client pc the
¤ database path will change so haw can i handle this problem ? i use VS 2005
¤ and the lamguage is VB.NET
¤

See if the following helps:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=439156&SiteID=1


Paul
~~~~
Microsoft MVP (Visual Basic)
 
Back
Top