Article View: borland.public.cppbuilder.database.ado
Article #1753Re: ADOCommand
From: Viatcheslav V. Vassiliev
Date: Fri, 20 Feb 2004 10:00
Date: Fri, 20 Feb 2004 10:00
47 lines
2410 bytes
2410 bytes
Does directory C:\razvoj exists?
> ADOCommand1->CommandText += Memo2->Lines->Strings[j];
Do not use += with properties, write ADOCommand1->CommandText =
Memo2->Lines->Text;
//------------------------------------------
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)
"Borut" <borut@bokosoft.si> �������/�������� � �������� ���������:
news:4035c42f$1@newsgroups.borland.com...
> What is wrong with this code:
>
> CREATE DATABASE [trgo] ON (NAME = N'trgo_dat', FILENAME =
> N'C:\razvoj\trgo.mdf' , SIZE = 20, FILEGROWTH = 10%) LOG ON (NAME =
> N'trgo_log', FILENAME = N'C:\razvoj\trgo.ldf' , SIZE = 2, MAXSIZE = 13,
> FILEGROWTH = 10%)
> COLLATE Slovenian_CI_AS
>
> I can not it execute in ADOCommand.
>
> Got this error:
> Device activation error. The physical file name 'C:\razvoj\trgo.mdf'
may
> be incorrect.
>
> How can I define command text in runtime. What is wrong with this:
>
> for (int j = 0; j < Memo2->Lines->Count; j++)
> {
> ADOCommand1->CommandText += Memo2->Lines->Strings[j];
> }
> ADOCommand1->Prepared = true;
> ADOCommand1->Execute();
>
> I always get error:
> Command text was not set for the command object.
>
> Thx
> Borut
>
>
Technical Details
Message-ID:
<4035dad1$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4035c42f$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10698b,6dbbf0786847a5e8 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2004-02-20 02:09:52 PST From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com> Newsgroups: borland.public.cppbuilder.database.ado References: <4035c42f$1@newsgroups.borland.com> Subject: Re: ADOCommand Date: Fri, 20 Feb 2004 13:00:43 +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: <4035dad1$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1077271249 213.234.218.42 (20 Feb 2004 02:00:49 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail