Click to See Complete Forum and Search --> : Syntax error converting the nvarchar value


Steve_FX
07-16-2006, 08:32 PM
We have just upsized an Access database to a MSSQL database, our website is built using ASP/VBscript and we used to use the following SQL statement:

SELECT *, (link_url &'?ID='& ID) AS NewURL
FROM dbo.menu_mnu
WHERE visible_mnu = 1
ORDER BY order_mnu ASC

Which doesn’t work with a MS SQL database so we changed it to:

SELECT *, (url_link_mnu +'?ID='+ id_mnu) AS NewURL
FROM dbo.menu_mnu
WHERE visible_mnu = 1
ORDER BY order_mnu ASC

However this gives this error…

Syntax error converting the nvarchar value 'link.asp?ID=' to a column of data type int.

Anyone got a solution…

Steve

PS – Apologies for posting this also in the ASP thread…