bcp_init throw exception

Tech-Archive recommends: Speed Up your PC by fixing your registry



Hi, everyone.

When I call bcp_init to initializes the bulk copy operation, I got an
exception that says "access violation reading location 0x00000009".
The DB connection is ok and bulk copy has been ennabled. My dev tool
is VS2005 and MS SQL Server 2005. Could you tell me the reason?
The coding looks like:
// Initialize bcp.
if (bcp_init(hdbc_, _bstr_t(tableName), NULL, NULL, DB_IN) == FAIL) //
Exception occurs??????????
{
return false;
}

Any suggestion are appreciated!

.



Relevant Pages

  • List of printer exceptions?
    ... I want to sent a bulk of documents to the printer but if ... something goes wrong e.g. out of paper, cartridge empty, tray open,etc I ... would like to get an exception back. ...
    (microsoft.public.dotnet.languages.vb)
  • Insert data into table from text file using sqlceresultset
    ... table/database using sqlceresultset? ... I tried using BULK insert statement but its throw exception. ...
    (microsoft.public.dotnet.framework.compactframework)