
VBScript Error due to converting databases from Access to SQL Server 6.5
Never had the problem because I don't work with SQL Server that often,
but maybe there is more information needed about the VarChar data
type. Like in Oracle there is precision and length. So instead of a
basic integer or long or whatever in Access you have one VarChar with
those properties for all numeric data. Hope this helps a little.
Quote:
> I have an ASP application that is running against a SQL Server 6.5
db. I
> recently converted the db from Access to SQL and have been confronted
with
> some errors.
> One error I received was:
> "Disallowed implicit conversion from datatype 'int' to datatype
'varchar'."
> I fixed that error by adding a CONVERT function to the SQL statement
within
> the ASP code, but now receive another error. Does someone have any
ideas how
> I could resolve this VBScript error:
> Microsoft VBScript runtime error '800a000d'
> Type mismatch: 'CONVERT'
> /hfcu/admin/messages/add.asp, line 15
> The code is used as follows (the convert function is the last line &
where
> the error happens):
> sSQL="INSERT into messages
(msgType,msgSummary,msgText,effectiveDate,effectiveDa{*filter*}d,last_mod_dt,l
ast_
Quote:
> mod_id) VALUES (" & _
> cbxType & "," & _
> "'" & summary & "'," & _
> "'" & message & "'," & _
> "'" & date1 & "'," & _
> "'" & date2 & "'," & _
> "'" & now() & "'," & _
> CONVERT(varchar,Session("adminID")) & ")"
--
Junebug
Chillin on a leaf ;-)--~
Sent via Deja.com http://www.*-*-*.com/
Share what you know. Learn what you don't.