Error NULLing Date field on SQL Server 
Author Message
 Error NULLing Date field on SQL Server

Error NULLing Date field on SQL Server
I'm having problems inserting a NULL value into a date field. I'm
using SQL Server 6.5, NT 3.51,  and VB 4(16-bit). My syntax is:

UPDATE Stats SET LastUpdated = NULL WHERE MachineId = 256

and I'm getting an 'ODBC call failed' error which I usually get when I
try to insert an invalid value (e.g. number into a text field).
I checked to make sure that the DB accepts a zero length field for
LastUpdated and the strange thing is that the same SQL statement works
in an Access database.

Any SQL Server experts out there?

Replace the x with lawson to mail me.

Fri, 01 Sep 2000 03:00:00 GMT  
 Error NULLing Date field on SQL Server

1    ODBC Call Failed is ALWAYS followed by another error that says WHY the
call failed. Check the rest of the Errors collection.

2    NULL is not the same as "". Check your column allows NULLs.

Simon Jones
PC Pro Magazine

Sat, 02 Sep 2000 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Error NULLing Date field on SQL Server

2. Problem Using Time Part of a Date-Time field in SQL-Server

3. Textbox bound to a date field in SQL server

4. error writing date field to Access 2000 using SQL statement in VB 6

5. Sql, make string field a date field.

6. Crystal Report Date Vrs Sql Server Date

7. Sql - Dates query to SQL Server and access

8. Insert date type varible through ODBC SQL server driver to SQL 7.0 database

9. way to find max var char field lengths of fields in SQL Server table

10. Help - Access yes/no fields upsized to SQL Server SQL_BIT fields

11. SQL Server Field Descriptions and Microsoft Access Field Descriptions

12. Error 20527 : SQL Server Error


Powered by phpBB® Forum Software