Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Easy SQL/VB question 1

Status
Not open for further replies.

sdand

IS-IT--Management
Oct 11, 2000
14
US
I have a simple VB/SQL Server problem, which is driving me nuts.

I want to reset a (non-Key)SQL field back to a Null value, from inside a VB form. I have tried changing the textbox value and tried changing the recordset directly, with no success. Here is what I have tried, all of which produced an error:

txtfield.text=""
txtfield.text=Null
adorecordset.recordset("FieldName")=Null
adorecordset.recordset("FieldName")=""

Any help would be greatly appreciated. [sig][/sig]
 
you can set the field back to null if the field allows nulls by doing the following

RS.fields("Field").value = vbnull

I hope this helps
[sig][/sig]
 
Vince:

Thank you very much for your help.

Scott [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top