🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #3552

Re: Connection String

#3552
From: Carlos
Date: Wed, 31 Jul 2002 17:34
58 lines
2599 bytes
If you want to change the content of the Connection String if the user
change the DSN you have 2 options:

If you use a DSN in a file:

ConnectionString = "FILE NAME=old_path\file.dsn";
Connected = false;
ConnectionString = "FILE NAME=new_path\file.dsn"

If you use a system DSN:

ConnectionString =  "Provider=provider ; Data Source=old_DSN; ..."
Connected = false;
ConnectionString = "Provider=provider ; Data Source=new_DSN; ..."

Bye!


"Samuel" <samuel@hectrix.com> escribi� en el mensaje
news:3d479081_1@dnews...
> May be my question is not clear. I want to know what should be the content
> of the connection string. Or, any other method can make my program change
> the database manually.
>
> Samuel
>
> "Vassiliev V.V." <news@vassilievvv.mtu-net.ru> wrote in message
> news:3d478d39_1@dnews...
> > You do not need DSN with ADO (if your OLEDB provider is not ODBC). You
can
> > change ConnectionString as
> >
> > ADOConnection1->Connected = false;
> > ADOConnection1->ConnectionString = "NewConnectionString";
> > ADOConnection1->Connected = true;
> >
> > Regards,
> > Vassiliev V.V.
> > http://www.oledbdirect.com
> >
> > "Samuel" <samuel@hectrix.com> ������?�������� ?�������� ��������?
> > news:3d475995$1_1@dnews...
> > > Hi,
> > >     I have an application that my client can change his DSN / ODBC
> > setting.
> > > Can I use ADO to do this? As I use mODBC before but I want to change
to
> > ADO
> > > now. Could anyone tell me how to change the connection string???
> > > Thanks alot
> > >
> > > Samuel
> > >
> > >
> >
> >
>
>
Technical Details
Message-ID: <3d481fb2_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!arclight.uoregon.edu!logbridge.uoregon.edu!xmission!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <3d475995$1_1@dnews> <3d478d39_1@dnews> <3d479081_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10698b,7d2700c30f2a7a8e
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-07-31 10:42:41 PST
From: "Carlos" <shangri-la@teleline.es>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3d475995$1_1@dnews> <3d478d39_1@dnews> <3d479081_1@dnews>
Subject: Re: Connection String
Date: Wed, 31 Jul 2002 19:34:42 +0200
Lines: 60
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 80.24.116.13
Message-ID: <3d481fb2_1@dnews>
X-Trace: dnews 1028136882 80.24.116.13 (31 Jul 2002 10:34:42 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!arclight.uoregon.edu!logbridge.uoregon.edu!xmission!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!dnews