Re: IRowsetFastLoad + Runtime Schema
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Sun, 9 Apr 2006 22:14:25 +0000 (UTC)
Chris Trueman (ctrueman@xxxxxxxxxxxxxxxx) writes:
I want to use IRowsetFastLoad to bulk load a MSSQL Server table that's
created at runtime. So I don't know at compile time the structure of the
table. The IRowsetFastLoad example code I've looked at does know the
structure at compile time and so is able to have a ready-made struct for
use as the row buffer.
I need to discover this at runtime and make the row buffer appropriately.
Any suggestions on how this can be done?
I haven't use IRowsetFastLoad, but my experience is that any buffer you
use with OLE DB, has offsets that you set up. Sure, it can be a struct,
but you set the offsets for each field explicitly don't you?
Of course, you also need to map the input file to this, but I assume
that the format of the input file is not known until run-time as well.
As for getting information about the table, there are several options,
including requesting the predifined COLUMNS_ROWSET.
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.
- Follow-Ups:
- Re: IRowsetFastLoad + Runtime Schema
- From: Chris Trueman
- Re: IRowsetFastLoad + Runtime Schema
- References:
- IRowsetFastLoad + Runtime Schema
- From: Chris Trueman
- IRowsetFastLoad + Runtime Schema
- Prev by Date: IRowsetFastLoad + Runtime Schema
- Next by Date: Re: IRowsetFastLoad + Runtime Schema
- Previous by thread: IRowsetFastLoad + Runtime Schema
- Next by thread: Re: IRowsetFastLoad + Runtime Schema
- Index(es):
Relevant Pages
|
|