🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Crate a MS Access database at runtime

#70
From: Mark Richards
Date: Mon, 10 Dec 2007 18:34
20 lines
1601 bytes
>  CatalogPtr cat = CoCatalog::Create();
>  cat->Create(strConn);

How do I set strConn to custom values?

On a TForm i have several controls, which the user can enter details about 
where to create the new database

TEdit txtDatabasepath   Fully qualified file name entered here
TEdit txtUserName       User name is entered here
TEdit txtPassword         Password is entered here
TCheckBox chkEncrypt If Checked then the database should be encrypted

So for example
txtDatabasepath->Text = "f:\risks\rsisks01.mdb";
txtUserName->Text = "boris";
txtPassword->Text = "letmein";
chkEncrypt->Checked = true;

What would I need to do to build the strConn for this?
Technical Details
Message-ID: <475d86a4$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <47598d82$1@newsgroups.borland.com> <475a8e59$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,2cb0116f91136979
X-Google-Attributes: gid10698b,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Mark Richards" <markcr@wapthespamntlworld.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <47598d82$1@newsgroups.borland.com> <475a8e59$1@newsgroups.borland.com>
Subject: Re: Crate a MS Access database at runtime
Date: Mon, 10 Dec 2007 18:34:28 -0000
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 81.103.92.168
Message-ID: <475d86a4$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1197311652 81.103.92.168 (10 Dec 2007 10:34:12 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail