Article View: borland.public.cppbuilder.database.ado
Article #5202Re: Connection String Dialog
From: Giuliano
Date: Tue, 03 Jul 2001 09:12
Date: Tue, 03 Jul 2001 09:12
47 lines
2234 bytes
2234 bytes
On Tue, 3 Jul 2001 10:10:58 +0200, "Formentz" <francesco@leotron.com> wrote:
>Hi all,
>how can I display the connection string dialog to the user?
>Someone suggested me a PromptConnectionString function, but I wasn't able to
>find it.
>
>TIA
>Ciao
> Formentz
>
You have to use 'PromptDataSource' function. Try with something
like the following code:
//---------------------------------------------------------------------------
class TfrmConfigGen : public TForm
{
__published: // IDE-managed Components
.........
TEdit *edtConnectionString;
.........
void __fastcall btnConnectionStringClick(TObject *Sender);
private: // User declarations
public: // User declarations
__fastcall TfrmConfigGen(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TfrmConfigGen *frmConfigGen;
//---------------------------------------------------------------------------
.....
.....
#include <AdoDB.hpp>
//---------------------------------------------------------------------------
void __fastcall TfrmConfigGen::btnConnectionStringClick(TObject *Sender)
{
edtConnectionString->Text =
PromptDataSource( (THandle)Handle, edtConnectionString->Text );
}
//---------------------------------------------------------------------------
Ciao!
Giuliano
Technical Details
Message-ID:
<3b418b65.232864301@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!195.54.122.107!newsfeed1.bredband.com!bredband!uio.no!newsfeed1.uni2.dk!newssuck.uni2.dk!dnewsReferences:
<3b417d10_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,52859a5eacdc7566 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2001-07-03 02:23:29 PST From: gcardinali@remove.adhoc.net (Giuliano) Newsgroups: borland.public.cppbuilder.database.ado Subject: Re: Connection String Dialog Date: Tue, 03 Jul 2001 09:12:14 GMT Message-ID: <3b418b65.232864301@newsgroups.borland.com> References: <3b417d10_2@dnews> X-Newsreader: Forte Agent 1.5/32.451 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 194.183.68.98 X-Trace: dnews 994151834 194.183.68.98 (3 Jul 2001 02:17:14 -0700) Lines: 47 Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!195.54.122.107!newsfeed1.bredband.com!bredband!uio.no!newsfeed1.uni2.dk!newssuck.uni2.dk!dnews