mmmmm, bisogna proprio dirti tutto....
codice:
Function ControllaVuoto(sSTr)
If IsNull(sSTr) or IsEmpty(sSTr) or Len(sSTr)=0 then
ControllaVuoto = "NULL"
Else
ControllaVuoto = sSTr
End If
End Function
poi puoi fare
codice:
A = ControllaVuoto(rec("A"))
B = ControllaVuoto(rec("B"))
C = ControllaVuoto(rec("C"))
SQL = "INSERT INTO tblx (A, B, C) VALUES (" & A & "#, " & B & ", '" & C & "')"
MyConn.execute(SQL)
oppure
codice:
SQL = "INSERT INTO tblx (A, B, C) VALUES (" & ControllaVuoto(rec("A"))
& "#, " & ControllaVuoto(rec("B")) & ", '" & ControllaVuoto(rec("C"))
& "')"
MyConn.execute(SQL)