How to construct the command line if i would like my VB program to addnew record to SQL? Can refer to my prior question on 'Where is the problem' for a clearer idea.
Thanks for the effort taken to help me.
Printable View
How to construct the command line if i would like my VB program to addnew record to SQL? Can refer to my prior question on 'Where is the problem' for a clearer idea.
Thanks for the effort taken to help me.
It goes something like this
This Example lets you Insert 3 specific fields, But you can leave out the (string1,date1,number1). If you leave this out you have to enter all fields and set The ones you don't want to NULL.Code:strSql = "INSERT INTO tbltest(string1,date1,number1)" & _
" VALUES('" & strString1 & "','" & txtDate1.value & "'," & iNumber1 & ")"
db.execute strSql
Hope This HelpsCode:strSql = "INSERT INTO tbltest" & _
" VALUES('" & strString1 & "','" & txtDate1.value & "'," & iNumber1 & ",NULL,NULL)"
db.execute strSql
Ian