VB6 - MSSQL Server 7 - ADO - Assigning NULL to field in RecordSet object 
Author Message
 VB6 - MSSQL Server 7 - ADO - Assigning NULL to field in RecordSet object

Use the vbNull constant

* Sent from RemarQ http://www.*-*-*.com/ The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



Sun, 17 Feb 2002 03:00:00 GMT  
 VB6 - MSSQL Server 7 - ADO - Assigning NULL to field in RecordSet object
I am using VB6 and MSSQL Server 7. I am using ADO through the MS OleDB
Provider for SQL Server.

I have an ADODB.RecordSet Object, and I want to assign NULL to a
field. This never seems to work. I can use and UPDATE SQL Query, but I
cannot simply code:

    MyRecordSet.Fields("Age") = NULL

or anything like that.

Lest you begin to suspect otherwise, the field does accept Nulls.

Is this simply impossible?

Thanks.

==================================
A. Scott White
Senior Systems Analyst
Affiliated Computer Services, Inc.

==================================



Mon, 18 Feb 2002 03:00:00 GMT  
 VB6 - MSSQL Server 7 - ADO - Assigning NULL to field in RecordSet object
My apologies for not have an answer either, but I don't think "vbNull" is
it.  vbNull is a long integer value, 0 to be exact, that is a possible
return value of the VarType() function.



Quote:
> Use the vbNull constant

> * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
> The fastest and easiest way to search and participate in Usenet - Free!



Tue, 19 Feb 2002 03:00:00 GMT  
 VB6 - MSSQL Server 7 - ADO - Assigning NULL to field in RecordSet object
Hmm.  Not much of this thread left in the group I'm looking at it
(vb.general.discussion), but It seems you want to know how to use the Null
keyword.

recordset!field = Null

should do it.  Unless this wasn't the original question....

Quote:

>My apologies for not have an answer either, but I don't think "vbNull" is
>it.  vbNull is a long integer value, 0 to be exact, that is a possible
>return value of the VarType() function.



>> Use the vbNull constant

>> * Sent from RemarQ http://www.remarq.com The Internet's Discussion
Network *
>> The fastest and easiest way to search and participate in Usenet - Free!



Tue, 19 Feb 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. VB6 - MSSQL Server 7 - ADO - Assigning NULL to field in RecordSet object

2. Assigning Null value to field of ADO Recordset

3. ADO - how to test for empty(null) fields in a recordset

4. Oracle database Ado recordset insert null into numeric field

5. VB6 ADODB.Recordset.Field = NULL Error

6. VB 6/ADO 2.1/JET- Copying NULL fields across recordsets causes error 80040e21

7. VB 6/ADO 2.1/JET- Copying NULL fields across recordsets causes error 80040e21

8. Assigning a picture to an Image field in SQL server, using ADO

9. VB6 ADODB.Recordset.Field = NULL Error

10. ADO Recordset when field is NULL

11. Assigning a picture to an Image field in SQL server, using ADO

12. ADO RecordSet Object fades to Null???

 

 
Powered by phpBB® Forum Software