Newbie Question from former DAO user --> my.settings and ConnectionString

A

Andre Rode

Hi NG,

I was working with VB6 and DAO till now, I'm trying some first steps
with VB.NET 2005 and ADO.NET and some questions came up to me

first: I defined in "My Project" - "Settings" a Connectionstring,
pointing to a mdb Access Database. Works so far. For some reason, the
location and/or the name of the mdb can be changed. How can I replace
the "Data Source" part in the ConnectionString? It's readOnly.

second: If I can't replace something in the connectionstring, so here's
what I want. I have a form with 5 TabPages in a tabcontrol. Each Tabpage
contains a datagridview element so it's a descending order of my tables

one customer --> his objects --> the bills of the object and so on

this works well. If the location/name of the mdb changes, how can I bind
the datagridviews (or the datasets or the databindingsources <- this
is really annoying to me, I didn't really get the sense of their
relationship, which one depends on what?) to the new connection?

Hope someone can answer these questions,

greetings from Germany, host of the FIFA WM 2006 :)
André
 
C

Cor Ligthert [MVP]

Andre,

There are tons of possibilities, You can add one in your config. You can
create your own tables, but know that you can change a connection forever
just before an action from the data/tableadapter.

Cor
 
P

Paul Clement

¤ Hi NG,
¤
¤ I was working with VB6 and DAO till now, I'm trying some first steps
¤ with VB.NET 2005 and ADO.NET and some questions came up to me
¤
¤ first: I defined in "My Project" - "Settings" a Connectionstring,
¤ pointing to a mdb Access Database. Works so far. For some reason, the
¤ location and/or the name of the mdb can be changed. How can I replace
¤ the "Data Source" part in the ConnectionString? It's readOnly.
¤
¤ second: If I can't replace something in the connectionstring, so here's
¤ what I want. I have a form with 5 TabPages in a tabcontrol. Each Tabpage
¤ contains a datagridview element so it's a descending order of my tables
¤
¤ one customer --> his objects --> the bills of the object and so on
¤
¤ this works well. If the location/name of the mdb changes, how can I bind
¤ the datagridviews (or the datasets or the databindingsources <- this
¤ is really annoying to me, I didn't really get the sense of their
¤ relationship, which one depends on what?) to the new connection?
¤
¤ Hope someone can answer these questions,

See if the following MSDN thread helps:

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


Paul
~~~~
Microsoft MVP (Visual Basic)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top