How do I BCP an int64 into SQL Server?? 
Author Message
 How do I BCP an int64 into SQL Server??

I'm using DB-Lib's C++ API to bulk copy a bunch of records from memory into
a SQL Server table. However, one of the fields that I need to BCP is an
__int64 (a 64-bit integer) and I can't figure out how to get it into the
table.

With a regular (32-bit) int, I can call bcp_bind() like this:

        retcode = bcp_bind (dbproc, (LPCBYTE)&m_ID, 0, (DBINT)-1,
                        (BYTE *)NULL, 0, SQLINT4, 1);

But, unfortunately, I can't find any documentation of a SQLINT8 DB-Lib
datatype. (Which I assume is what I'd need for an __int64.)

How do I bcp_bind() an int64??

Thanks!

John



Sun, 17 Sep 2000 03:00:00 GMT  
 How do I BCP an int64 into SQL Server??

Quote:

> However, one of the fields that I need to BCP is an
>__int64 (a 64-bit integer) and I can't figure out how to get it into the
>table.

This may not be the ideal solution, but, I've in the past used 'money' data
type with an assumed implicit decimal point after the fourth least
significant decimal digit.

- Vale



Mon, 18 Sep 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Perform SQL statement in VC++ against MS SQL Server 7.0

2. SQL Syntax on SQL Server

3. Q:Use DISTINCT in SQL statement with OLE DB for SQL Server

4. SQL Server with CDatabase/CRecordset and server cursors

5. Win2k Adv. Server + Sql Server 7

6. Sending info from server to client in SQL Server

7. CRecordset and SQL Server Linked Server View

8. How do you run a SQL Server sql script file against a SQL Server database?

9. sql console app can this be done ?

10. SQL Parameters, what am i doing wrong?

11. Doing relative paths in ATL Server?!?

12. Are you doing server programming?

 

 
Powered by phpBB® Forum Software