Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Error when Converting VarChar to Int

Author  Topic 

umstorom
Starting Member

6 Posts

Posted - 2010-05-22 : 06:29:16
Hello everyone,

I got the following error:

Microsoft OLE DB Provider for SQL Server (0x80040E07)
Error converting data type varchar to int.
/initBanking/Forex/post.asp, line 520

Line 520:
Sub UpdateZoneDisplay()
sSQL = "EXEC spUpdateZones " & iStoreID & ",'" & sfk_zoneID & "," & sfk_storeID & "'"
SET oRS = oDB.execute(sSQL)
istoreID = oRS("storeID")
End Sub


Thanks.

http://www.developerbay.net

Kristen
Test

22859 Posts

Posted - 2010-05-22 : 12:44:57
Thatn is going to generate

EXEC spUpdateZones 11111,'2222,3333'

which is probably NOT the placing of single quotes that you want?

Beware that this is also at risk from SQL Injection - so open to peopl hacking into your database.
Go to Top of Page
   

- Advertisement -