Assigning Null value to field of ADO Recordset 
Author Message
 Assigning Null value to field of ADO Recordset

I am trying to assign a Null value to a field in an ADO recordset.  When I
do this I get an "errors occured" message.  I am opening the Recordset using
a command object with a cursor type of adOpenKeySet and a locktype of
adLockOptimistic.  I also tried opening a with a cursor typr of
adOpenDynamic.  The data is going into a SQL Server 7 database and the data
type of the column is smalldatetime.  What isn't making sense to me is that
the value in the field is already null and it won't let me assign Null to
it.  If anyone could help me with this it would be greatly appreciated.

Thanks,

Josh



Tue, 28 May 2002 03:00:00 GMT  
 Assigning Null value to field of ADO Recordset
Josh,
You haven't said how you are assigning NULL. You cannot assign it like a
variable. You may have to use "IS NULL".

Kind Regards
Mike MCP

Quote:
> I am trying to assign a Null value to a field in an ADO recordset.  When I
> do this I get an "errors occured" message.  I am opening the Recordset
using
> a command object with a cursor type of adOpenKeySet and a locktype of
> adLockOptimistic.  I also tried opening a with a cursor typr of
> adOpenDynamic.  The data is going into a SQL Server 7 database and the
data
> type of the column is smalldatetime.  What isn't making sense to me is
that
> the value in the field is already null and it won't let me assign Null to
> it.  If anyone could help me with this it would be greatly appreciated.

> Thanks,

> Josh



Thu, 30 May 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

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

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

3. adodb connection to excel: recordset.fields(i).value=null for fields with numeric value

4. adodb connection to excel: recordset.fields(i).value=null for fields with numeric value

5. adodb connection to excel: recordset.fields(i).value=null for fields with numeric value

6. Assign the null value to DB2 fields.

7. Assigning Null Values to data bound fields using remote data control

8. Assigning a Date field a Null value....

9. Assigning a Date field a Null value....

10. problem in assigning values to ado fields from normal data control

11. How do I allow NULL value on a required field in disconnected recordset

12. Null values reading Excel spreadsheets into ADO recordsets

 

 
Powered by phpBB® Forum Software