🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.ado
2 messages
2 total messages Started by Russell Allen Wed, 17 Aug 2005 15:56
Using ADOX in C Builder 5
#486
Author: Russell Allen
Date: Wed, 17 Aug 2005 15:56
19 lines
1369 bytes
Hi all,

I'm trying to use ADOX in C Builder 5.  I'm trying to add a table to a catalog using the following code:

TCOM_Catalog cat = CoCatalog::Create();
cat->Create(connectionString);
TCOM_Table table = CoTable::Create();
cat->Tables->Append(table);

When I hit that fourth line, I'm getting an error:

"Type mismatch in parameter 'Item' (wanted 'TVariantInParam', got 'TCOM_Table')"

Any suggestions?  This one's driving me mad!

Many thanks,

Russ
Re: Using ADOX in C Builder 5
#491
Author: Viatcheslav V. Vassiliev
Date: Thu, 18 Aug 2005 06:51
37 lines
2150 bytes
Try something like this:

OleVariant param = table;
cat->Tables->Append(param);

//------------------------------------------
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)


"Russell Allen" <russell.allen@bt.com> �������/�������� � �������� 
���������: news:43035e33$1@newsgroups.borland.com...
>
> Hi all,
>
> I'm trying to use ADOX in C Builder 5.  I'm trying to add a table to a 
> catalog using the following code:
>
> TCOM_Catalog cat = CoCatalog::Create();
> cat->Create(connectionString);
> TCOM_Table table = CoTable::Create();
> cat->Tables->Append(table);
>
> When I hit that fourth line, I'm getting an error:
>
> "Type mismatch in parameter 'Item' (wanted 'TVariantInParam', got 
> 'TCOM_Table')"
>
> Any suggestions?  This one's driving me mad!
>
> Many thanks,
>
> Russ 
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