Re: Fast load options in OpenRowset



mweeks (mweeks@xxxxxxxxxxxxxxxxxxxxxxxxx) writes:
> Thanks for the speedy reply. No I wasn't; I thought that I wouldn't
> need to since I'm setting vValue.vt and vValue.bstrVal - wouldn't
> VariantInit just set the variant to VT_EMPTY which I am then replacing?

I may recall wrong, but I believe that I have made the same assumption -
and errors occurred?

> I'm sorry, I'm very green at this. I just added VariantInit (
> &RFLProperties[0].vValue ) to the code but I'm still getting
> DB_E_ERRORSOCCURRED.

Did you set the data source property SSPROP_ENABLEFASTLOAD?

I recommend studying the SQL Server Books Online. The specifics for
SQLOLEDB are covered there, including the bulk-copy stuff.

Also, download the samples from
http://www.microsoft.com/downloads/details.aspx?FamilyID=7824ba50-3e29-45cf-8c02-5597c014a707&DisplayLang=en
I believe there is a bulk-copy sample there.



--
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
.



Relevant Pages

  • Re: Query training -- Complex queries
    ... > Update PositionsEOM ... Here you don't have a derived table, but a correlated subquery. ... UPDATE in Books Online. ... is not written for SQL Server. ...
    (microsoft.public.sqlserver.server)
  • Re: Linked Server: How to check if server exists?
    ... The root problem is described in the Books Online topic Batches. ... Rick Byham, SQL Server Books Online ... linked server don't run on those development machines not having that linked ...
    (microsoft.public.sqlserver.connect)
  • Re: STORED PROCEDURE - passing table name as a parameter
    ... T-SQL, is that you get problems if the view definition does not fit into ... will need to query other system tables, for instance syscolumns. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: Problem when changing Views
    ... There aree several reasons. ... I use neither of the tools, but I guess that Design View resubmits the ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: SQL 2005: Help files not valid?
    ... Please try the following instructions to remove and reinstall Books Online. ... If this doesn't solve the problem, we'll need to get the Visual Studio folks ... In Add or Remove Programs, select Microsoft SQL Server 2005, and then ... Complete the remaining steps in the Installation Wizard. ...
    (microsoft.public.sqlserver.setup)

Loading