PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET Newbie Question from former DAO user --> my.settings and ConnectionString

Reply

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

 
Thread Tools Rate Thread
Old 19-06-2006, 01:22 AM   #1
Andre Rode
Guest
 
Posts: n/a
Default Newbie Question from former DAO user --> my.settings and ConnectionString


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é
  Reply With Quote
Old 19-06-2006, 05:04 AM   #2
Cor Ligthert [MVP]
Guest
 
Posts: n/a
Default Re: Newbie Question from former DAO user --> my.settings and ConnectionString

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

"Andre Rode" <Andre.Rode@gmx.at> schreef in bericht
news:e74qoa$o8n$1@online.de...
> 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é



  Reply With Quote
Old 19-06-2006, 04:33 PM   #3
Paul Clement
Guest
 
Posts: n/a
Default Re: Newbie Question from former DAO user --> my.settings and ConnectionString

On Mon, 19 Jun 2006 02:22:35 +0200, Andre Rode <Andre.Rode@gmx.at> wrote:

¤ 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/Sh...439156&SiteID=1


Paul
~~~~
Microsoft MVP (Visual Basic)
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off