🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Creating the connectionstring?

#1139
From: forums.inprise.com
Date: Fri, 28 Jan 2005 11:15
23 lines
1687 bytes
Hi,

I would like to display available DSN:s on a computer. (I don't want to 
hardcode dsn user and login....)
I have copied a small code snippet below but I wonder if there is an easier 
way to do it.

like:
ADOConnection1->ConnectionObject-> etc etc

regards
Christofer

-----------------------------------------------------------------------------------------------
IDataSourceLocator              * dl   = NULL;
Adodb_tlb::_Connection          * conn  = NULL;
CoCreateInstance(CLSID_DataLinks, NULL, CLSCTX_INPROC_SERVER, 
IID_IDataSourceLocator, (void**)&dl);
CoCreateInstance(CLSID_Connection, NULL, CLSCTX_INPROC_SERVER, 
Adodb_tlb::IID__Connection, (void**)&conn);

dl->PromptEdit((IDispatch **)&conn);
conn->Open(L"",L"",L"",Adodb_tlb::adConnectUnspecified); 
Technical Details
Message-ID: <41fa1ee5$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,3e6a6114b6547f86,start
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "forums.inprise.com" <cfn@ur.se>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Creating the connectionstring?
Date: Fri, 28 Jan 2005 12:15:49 +0100
Lines: 25
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 195.54.121.72
Message-ID: <41fa1ee5$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1106910949 195.54.121.72 (28 Jan 2005 03:15:49 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail