Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert SQL string problem

Status
Not open for further replies.

pewilson

Technical User
Mar 9, 2001
52
US
Hello, I am inserting two values from my form into one value in the database. I am allowing users to select the time from a Option list name="cboDepartureTime" and select AM/PM from another Option list name="cboTime so I end up with a value of 3:00 PM. My browser will error out on this line stating "Data type mismatch in criteria expression."

This is the line of code that is giving me trouble.

strSQL = strSQL & request.form("cboDepartureTime & & cboTime") & "')"

The data type in the database is set to "text".

Im not sure how to go about fixing it.

Thank you in advance.
Paul
paul_wilson74@hotmail.com
 
strSQL = strSQL & request.form("cboDepartureTime") & request.form(cboTime") & "')"
 
Thanks for help sjravee!!! One more question, what is the best way to insert a space between the two variables?

Thanks again Paul
paul_wilson74@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top