🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How to create an Excel file from a Cpp builder 5 pgm using ADO Express

#929
From: jayo
Date: Sun, 13 Mar 2005 19:12
73 lines
2771 bytes
No, it doesn't work.


"jayo" <jayo1.geo@yahoo.com> escribi� en el mensaje 
news:42330302@newsgroups.borland.com...
> Para dejar traza: (del correo que me hizo favor de responder Viatcheslav)
>
> Your query should look as:
>
> SELECT * INTO [pagos] IN "" [Excel 8.0;Database=d:\temp\listapagos.xls] 
> FROM [pagos]
>
> This one should work. Do not forget to escape " and \ characters in code.
>
>
>   QuickRep1->Free();
>
>   QuickRep1->~TQuickRep();
>
>
>
> ADOCommand1->Free();
>
> ADOCommand1->~TADOCommand();
>
>
>
> It is not correct. Use "delete QuickRep1;" and "delete ADOCommand1;" 
> instead.
>
>
>
>
> Regards,
> Viatcheslav V. Vassiliev
> "jayo" <jayo1.geo@yahoo.com> escribi� en el mensaje 
> news:422f0b26@newsgroups.borland.com...
>> I'm using BCB 5, with ADO Express I create an Access database, with a 
>> table. I want that table in an Excel file. I am doing:
>> .
>> .
>> .
>> ADOConnection1->ConnectionString = bt; // Access
>> ADOConnection1->Open();
>> ADOTable1->Connection= ADOConnection1;
>> ADOTable1->TableName= L"PAGOS";
>> ADOTable1->Open();
>> .
>> .
>>   ADOTable1->Append();
>>   ADOTable1->FieldValues[AnsiString("CCLIENTE")]=AnsiString(clien);
>>   ADOTable1->FieldValues[AnsiString("NCLIENTE")]=AnsiString(nombre);
>> .
>> .
>>   ADOTable1->Post();
>> .
>> .
>> WideString yt="SELECT * INTO Excel 10.0;DATABASE= LISTAPAGOS.PAGOS FROM
>> PAGOS";
>>   ADOConnection1->Execute(yt, ?, ?); // What parameters to use ?   ERROR
>> .
>> .
>>   QuickRep1->Preview();
>>   QuickRep1->Free();
>>   QuickRep1->~TQuickRep();
>> ADOTable1->Close();
>> ADOConnection1->Close();
>>
>> Thank you very much in advance.
>> Jesus
>>
>
> 
Technical Details
Message-ID: <42349094@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!tdsnet-transit!newspeer.tds.net!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <422f0b26@newsgroups.borland.com> <42330302@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,2e49c0607a2d6636
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII
From: "jayo" <jayo1.geo@yahoo.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <422f0b26@newsgroups.borland.com> <42330302@newsgroups.borland.com>
Subject: Re: How to create an Excel file from a Cpp builder 5 pgm using ADO Express
Date: Sun, 13 Mar 2005 13:12:20 -0600
Lines: 75
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
NNTP-Posting-Host: 148.240.98.251
Message-ID: <42349094@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1110741140 148.240.98.251 (13 Mar 2005 11:12:20 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!tdsnet-transit!newspeer.tds.net!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail