🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Creating A ADO Component at Runtime (Not Working)

#3000
From: Tom Van den Bon
Date: Tue, 21 Jan 2003 11:38
27 lines
2175 bytes
When I use a ADOConnection component then I can connect perfectly but when I use your method then the I get an error that I can't connect to the server, access denied or server doesn't exist. I'm using the exact same provider and connectionstring than with the component, but the component works and your example doesn't ....

Any ideas ?


"Sergey Muschin" <sergey.muschin@tonservices.com> wrote:
>Hi Tom Van den Bon,
>
>  m_pADOConn = new TADOConnection(this);
>  m_pADOConn->Provider = "SQLOLEDB.1";
>  m_pADOConn->ConnectionString ="Provider=SQLOLEDB.1;Persist Security
>Info=False;Initial Catalog=snm;Data Source=dev-fileserver";
>  m_pADOConn->Mode = cmReadWrite;
>  m_pADOConn->IsolationLevel = ilCursorStability;
>  m_pADOConn->CursorLocation = clUseClient;
>  //and so on, if You need to set up something else
>  m_pADOConn->Open("UID","PWD");  //open it
>  //do something
>  m_pADOConn->Close(); //close it
>  delete m_pADOConn;//free memory
>
>PS: this is just an example. In a real world You would need to take care at
>least about Exceptions...
>
>Regards,
>Sergey Muschin
Technical Details
Message-ID: <3e2d3122$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!c03.atl99!news.webusenet.com!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3e267ed2$1@newsgroups.borland.com> <3e26d6e6$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,10c29d682611b25e
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-01-21 03:42:05 PST
From: "Tom Van den Bon" <thagrudge@softhome.net>
Sender: "Tom Van den Bon" <thagrudge@softhome.net>
Reply-To: "Tom Van den Bon" <thagrudge@softhome.net>
Subject: Re: Creating A ADO Component at Runtime (Not Working)
Newsgroups: borland.public.cppbuilder.database.ado
X-User-Info: 196.33.48.162 196.33.48.162    
References: <3e267ed2$1@newsgroups.borland.com> <3e26d6e6$1@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.65
Message-ID: <3e2d3122$1@newsgroups.borland.com>
Date: 21 Jan 2003 03:38:10 -0800
X-Trace: newsgroups.borland.com 1043149090 207.105.83.65 (21 Jan 2003 03:38:10 -0800)
Lines: 28
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!c03.atl99!news.webusenet.com!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail