NULL into table

S

Striker

I am trying to inset into a SQL database table some information based on
cell entries. One of my fields takes a NULL value, when I look at the SQL
table it actually says NULL in there. So my question is how do I get the
Null into the table from my insert query?

Should the variable I'm copying the data from the cell to, be a Integer, or
String etc.

MySQL = "insert into carer
(carer_lookup_type,carer_code,carer_prompt,full_name,carer_prompt_sp) values
(" & sLookup & ", " & _
iCarCode & ", '" & iPrompt & "', '" & sFname & "', '" & iSP & "')"

Thanks in advance
 
N

NickHK

Do not include that column or value in your Insert. Let the DB engine handle
it.

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top