๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#928
From: jayo
Date: Sat, 12 Mar 2005 14:56
66 lines
2489 bytes
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: <42330302@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!newsprint.newsread.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.usenet.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <422f0b26@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>
Subject: Re: How to create an Excel file from a Cpp builder 5 pgm using ADO Express
Date: Sat, 12 Mar 2005 08:56:04 -0600
Lines: 68
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.245
Message-ID: <42330302@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1110639362 148.240.98.245 (12 Mar 2005 06:56:02 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!newsprint.newsread.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.usenet.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail