In a macro I am trying to copy data from a file and Insert a new record into a table. Some of the date values in the file are missing. When I try to in Insert a null date it gives me a SQL exception. What do I need to do to a NULL date to create a null value in the table?
' Values read from file
instr1 = "hello"
instr2 = "world"
indate1 = ""
' Macro processing
indatec = Format(indate1,"yyyy-mm-dd")
sSQL = "INSERT INTO ""aTable"" (""str1"",""date1"",""str2"") VALUES ('" _
& instr1 & "','" & indatec & "','" & instr2 & "');"
ostatement.executeQuery(sSQL)
Thanks, David