The Open Source Swiss Army Knife

/code/vbscript/
/code/vbscript/ + sub-categories
http://www.sirfsup.com/
web directory content
    
      

Not logged in
Chat Register Login
return to:  http:/www.sirfsup.com      /code   /vbscript 
Permalink: isnotnull.txt
Title: add
article options : please login   |  raw source view  

  1. isnull on a recordset values Private Sub xxx(id_in As Integer)

    If Not IsNull(id_in) Then

    Dim rst As ADODB.Recordset Dim conn As ADODB.Connection Set rst = New ADODB.Recordset Set conn = New ADODB.Connection conn.ConnectionString = connString() conn.Open rst.Open "select * from client where client_id = '" & Me.OpenArgs & "'", conn If Not rst.EOF Then

    If Not IsNull(rst!company_name) Then typCompanyInfo.company_name = rst!company_name End If If Not IsNull(rst!description) Then typCompanyInfo.description = rst!description End If If Not IsNull(rst!street) Then typCompanyInfo.street = rst!street End If If Not IsNull(rst!city) Then typCompanyInfo.city = rst!city End If If Not IsNull(rst!state) Then typCompanyInfo.state = rst!state End If If Not IsNull(rst!zip) Then typCompanyInfo.zip = rst!zip End If If Not IsNull(rst!bill_attn_to) Then typCompanyInfo.bill_attn_to = rst!bill_attn_to End If If Not IsNull(rst!bill_street) Then typCompanyInfo.bill_street = rst!bill_street End If If Not IsNull(rst!bill_city) Then typCompanyInfo.bill_city = rst!bill_city End If If Not IsNull(rst!bill_state) Then typCompanyInfo.bill_state = rst!bill_state End If If Not IsNull(rst!bill_zip) Then typCompanyInfo.bill_zip = rst!bill_zip End If If Not IsNull(rst!bill_phone) Then typCompanyInfo.bill_phone = rst!bill_phone End If

Else

2. on variant

this will work -- don't try isempty or isnull on a string it's all bullshit


Leave a Reply
Your Name:     anonymous
Your Email:
Website:  
Comments:

The author will be notified of your reply.
return to top