Thread View: borland.public.cppbuilder.database.ado
4 messages
4 total messages
Started by jayo
Wed, 09 Mar 2005 14:41
How to create an Excel file from a Cpp builder 5 pgm using ADO Express
Author: jayo
Date: Wed, 09 Mar 2005 14:41
Date: Wed, 09 Mar 2005 14:41
33 lines
1882 bytes
1882 bytes
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
Re: How to create an Excel file from a Cpp builder 5 pgm using ADO Express
Author: jayo
Date: Sat, 12 Mar 2005 14:56
Date: Sat, 12 Mar 2005 14:56
66 lines
2489 bytes
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
>
Re: How to create an Excel file from a Cpp builder 5 pgm using ADO Express
Author: jayo
Date: Sun, 13 Mar 2005 19:12
Date: Sun, 13 Mar 2005 19:12
73 lines
2771 bytes
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
>>
>
>
Re: How to create an Excel file from a Cpp builder 5 pgm using ADO Express
Author: jayo
Date: Sun, 13 Mar 2005 19:49
Date: Sun, 13 Mar 2005 19:49
81 lines
2826 bytes
2826 bytes
This is what works:
ADOCommand1->CommandText = "SELECT * INTO [PAGOS1] IN
\"D:\\Temp\\LISTAPAGOS.XLS\" [Excel 8.0;] FROM [PAGOS]";
Jesus
"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
>>
>
>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads