Retrieving DATE type from SQL Server 6.5 
Author Message
 Retrieving DATE type from SQL Server 6.5

Dear All

I have developed a program in vc++ which uses ODBC connection to the
SQL 6.5 database.But there is a problem with date data type.
 I can send dates (as COleDateTime)  into SQL Server Database and it is
stored correctly. But when we want to get Date values from SQL Server
there are some problems. It can't assign to any data type in vc++ 6.
How can I solve this problem.

Regards

Nihal

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sun, 22 Dec 2002 03:00:00 GMT  
 Retrieving DATE type from SQL Server 6.5

Quote:

>Dear All

>I have developed a program in vc++ which uses ODBC connection to the
>SQL 6.5 database.But there is a problem with date data type.
> I can send dates (as COleDateTime)  into SQL Server Database and it is
>stored correctly. But when we want to get Date values from SQL Server
>there are some problems. It can't assign to any data type in vc++ 6.
>How can I solve this problem.

I did it by writing my own date class, which is basically a wrapper
for a TIMESTAMP_STRUCT (the actual data type passed).

You have to be sure that the data exchange functions are seeing the
TIMESTAMP_STRUCT & not your class, though.

HTH

Paul.
-------------------------------------------
Expressed opinions are usually my own.
Especially if they're any good (of course).
-------------------------------------------



Sun, 22 Dec 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Binding an edit control to a date column using ODBC to connect to SQL 6.5 database

2. sql server version 6.5 problems

3. SQLConnect behaviour (MS SQL Server 6.5)

4. PROBLEM: Accessing SQL SERVER 6.5 from 16 bit ODBC Application (VC++ 1.5)

5. ADO Update very slow against SQL Server 6.5

6. DAO vs ODBC for SQL Server 6.5

7. SQL Server 6.5/ ADO

8. Connection is busy with results - VC++ 1.52, SQL Server 6.5, ODBC

9. Wrong German Umlaute in SQL SERVER 6.5 (NT)

10. VC++ Enterprise boxed with MS SQL Server, Developer Edition 6.5

11. CLongBinary SQL Server 6.5 Images

12. SQLGetData Fails on Multiple Active Statement Handles with SQL Server 6.5

 

 
Powered by phpBB® Forum Software