Article View: borland.public.cppbuilder.database.ado
Article #1649Re: TADOConnection and Win2000 Services
From: Viatcheslav V. Vassiliev
Date: Sat, 06 Mar 2004 11:07
Date: Sat, 06 Mar 2004 11:07
47 lines
2850 bytes
2850 bytes
> Is it possible to use a TADOConnection object in a Windows2000 service? > Is it possible to set the connection paramenters at run-time? Yes, it is possible > Is there some specific code needed to set the "ConnectionString" property at runtime other then assigning an "AnsiString" string to the "WideString"? No. > Is it really a need to use the CoInitialize() function? and why? Yes, this function initializes COM in application or service. ADO is COM-based so COM must be initialized before using ADO. > If TADOConnection is a VCL object, why is it allowed to be used in a Service? Why not? Anyway Windows has no methods to determine is some code VCL object or no - Windows knows nothing about VCL. //------------------------------------------ Regards, Vassiliev V. V. http://www.managed-vcl.com - using .Net objects in Delphi for Win32 + ADO.Net http://www.oledbdirect.com - The fastest way to access MS SQL Server, MS Jet (Access) and Interbase (through OLEDB) "Cesare" <cquarinto@shaw.ca> �������/�������� � �������� ���������: news:4048f9f2$1@newsgroups.borland.com... > > Hi, > I aplogize in advance for these questions, I am not a "professional". > Is it possible to use a TADOConnection object in a Windows2000 service? > Is it possible to set the connection paramenters at run-time? > Is there some specific code needed to set the "ConnectionString" property at runtime other then assigning an "AnsiString" string to the "WideString"? > Is it really a need to use the CoInitialize() function? and why? > If TADOConnection is a VCL object, why is it allowed to be used in a Service? > > Thanks > Cesare > >
Technical Details
Message-ID:
<4049b102@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!zeus.visi.com!priapus.visi.com!orange.octanews.net!news-out.visi.com!petbe.visi.com!news.octanews.net!in.100proofnews.com!in.100proofnews.com!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4048f9f2$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10698b,9b1758f7e96fdfbf X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2004-03-06 03:09:25 PST From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com> Newsgroups: borland.public.cppbuilder.database.ado References: <4048f9f2$1@newsgroups.borland.com> Subject: Re: TADOConnection and Win2000 Services Date: Sat, 6 Mar 2004 14:07:45 +0300 Lines: 49 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 213.234.218.42 Message-ID: <4049b102@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1078571266 213.234.218.42 (6 Mar 2004 03:07:46 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!zeus.visi.com!priapus.visi.com!orange.octanews.net!news-out.visi.com!petbe.visi.com!news.octanews.net!in.100proofnews.com!in.100proofnews.com!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail