|
-
Nov 6th, 2000, 07:07 PM
#1
Thread Starter
PowerPoster
I have some invoice numbers (which is a string) pulling from an SQL database using an adodc control. Some of the invoices that are in the database are blank. I can't figure out how to check and make all the invoice numbers that are blank to be changed to a zero. here's what i tried
Do while adodc1.recordset.Eof = false Then
If adodc1.recordset.Invoice_no = "" '(I tried Null also)
adodc1.recordset.Invoice_no = "0"
End if
Loop
**I'm still new to using databases and the adodc
Thanks
-
Nov 6th, 2000, 11:51 PM
#2
Hi, in VB to be able to use null u have to use VBNull, try using this.
Secondly u should use adodc1.recordset("Invoice_no").value and not adodc1.recordset.invoice_no.
Hope it works, just try it out. All the best...vijay
-
Nov 7th, 2000, 08:03 AM
#3
Member
Try using:
If IsNull(adodc1.recordset.Invoice_no) then
adodc1.recordset.Invoice_no = "0"
End If
Barend
JHB-SA
Nothing is impossible, except skiing through a revolving door.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|