
August 1st, 2000, 10:02 PM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,575
  
Time spent in forums: < 1 sec
Reputation Power: 22
|
|
|
CONVERT function
<i><b>Originally posted by : Mel (meldrape@texas.net)</b></i><br /><br />Greetings,<br /><br />I am receiving the following error:<br /><br />Microsoft OLE DB Provider for ODBC Drivers error '80040e07' <br /><br />[Microsoft][ODBC SQL Server Driver][SQL Server]Disallowed implicit<br />conversion from datatype 'varchar' to datatype 'numeric' Table:<br />'IndAffairs.dbo.NAICMeetings', Column: 'MeetingNo' Use the CONVERT function<br />to run this query. <br /><br />>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><br /><br />Here is the SQL statement:<br /><br /> If Request.Form("chk" & rsNaic("MeetingNo")) = "on" Then<br />strSQLStatement = "INSERT INTO NAICMeetings (Name,<br />MeetingNo, Attending, OfInterest, Comments)" _<br />& "VALUES ('" & Session("FullName") & "','" &<br />rsNaic("MeetingNo") & "'," & Cint(Request.form("chkAttend" &<br />rsNaic("MeetingNo"))) & "," & Cint(Request.form("chkOfInterest" &<br />rsNaic("MeetingNo"))) & ",'" & Trim(Replace(Request.form("txtComments" &<br />rsNaic("MeetingNo")),"'","''")) & "')"<br />oConn.Execute strSQLStatement,,1 OR 128<br />End If<br /><br />I had to change the datatype of the "MeetingNo" to numeric from varchar.<br />How do I deal with it in this statement? Any thought would be greatly<br />appreciated. Thanks!!<br />
|