D
Dean Slindee
Using VS2005 and ADODB to populate tables in an Access 2003 .mdb database.
Is there a way to represent a null value in text for objMiddleName's value
when using a sql statement composed and used directly in text, like this:
'build insert values
Dim sql As String = String.Empty
Dim objLastName As Object = "Smith"
Dim objFirstName As Object = "John"
Dim objMiddleName As Object = ????????
Dim objBirthDate As Object = Today.Date
sql = "INSERT INTO tblClient " & _
"(`LastName`, `FirstName`, `MiddleName`, `BirthDate)) "
& _
"VALUES ('" & objLastName & "', '" & _
objFirstName & "', '" & _
objMiddleName & "', '" & _
objBirthDate & "')"
'insert
Try
cnnJet.Execute(sql, lngRecordsAffected, adCmdText +
adExecuteNoRecords)
Thanks,
Dean S
Is there a way to represent a null value in text for objMiddleName's value
when using a sql statement composed and used directly in text, like this:
'build insert values
Dim sql As String = String.Empty
Dim objLastName As Object = "Smith"
Dim objFirstName As Object = "John"
Dim objMiddleName As Object = ????????
Dim objBirthDate As Object = Today.Date
sql = "INSERT INTO tblClient " & _
"(`LastName`, `FirstName`, `MiddleName`, `BirthDate)) "
& _
"VALUES ('" & objLastName & "', '" & _
objFirstName & "', '" & _
objMiddleName & "', '" & _
objBirthDate & "')"
'insert
Try
cnnJet.Execute(sql, lngRecordsAffected, adCmdText +
adExecuteNoRecords)
Thanks,
Dean S