Christineeve
Programmer
Hi
I hate to bother the community with such a trival question, but as much as I've researched since last week, for the life of me, I cannot see what is wrong with my syntax. Would you review my syntax and see if something leaps out at you and let me know what I might have missed?
My connection object works fine. My database is fine. When I pass this hardcoded query to my database it writes to the database. When I try to pass a value from the TextBox, the query stops with an error that say either that there is no value passed or there is a comma error.
I've researched this for several days. At this point, it would help to have expert eyes look at it and see if there are any suggestions.
This works:
This throws an error with every combination I've tried
I've researched this for days. Expert eyes with suggestions are sincerely appreciated.
Also, all the other fields write just fine, but they're text fields. Next I have to write a date. I'm guessing whatever I'm doing wrong here will also be a problem with the date. Again, if I hardcode they pass into the database fine. It's passing from the form that's become a problem.
Thanks Christine
I hate to bother the community with such a trival question, but as much as I've researched since last week, for the life of me, I cannot see what is wrong with my syntax. Would you review my syntax and see if something leaps out at you and let me know what I might have missed?
My connection object works fine. My database is fine. When I pass this hardcoded query to my database it writes to the database. When I try to pass a value from the TextBox, the query stops with an error that say either that there is no value passed or there is a comma error.
I've researched this for several days. At this point, it would help to have expert eyes look at it and see if there are any suggestions.
This works:
Code:
Dim sSQLAddNameID = _
'"INSERT INTO tblEmpPersonal(pk_EmpInfoID) VALUES (10000001)"
This throws an error with every combination I've tried
Code:
Dim sSQLAddNameID = _
"INSERT INTO tblEmpPersonal(pk_EmpInfoID) VALUES (Trim(CInt(frmRibbonCtl.txtEmplyNo.Text))) "
I've researched this for days. Expert eyes with suggestions are sincerely appreciated.
Also, all the other fields write just fine, but they're text fields. Next I have to write a date. I'm guessing whatever I'm doing wrong here will also be a problem with the date. Again, if I hardcode they pass into the database fine. It's passing from the form that's become a problem.
Thanks Christine