Hi everyone,
I'm implementing a computer inventory system using ADO and python with SQL Server 2K. My problem is with the following code:
def lookupHdw( barcode ):
(hdwLook, success) = conn.Execute("SELECT emp FROM table1 WHERE CPU = " + barcode )
Response.Write( hdwLook.Fields("emp".Value )
lookupHdw( "HTS00002560" )
I'm using python with asp so i get the following error at runtime: "Invalid column name 'HTS00002560'". I've run this statement using SQL query analyzer and it worked fine.
I believe it's an issue with strings because i did a function identical to this one except with numeric values and not varchar's and it worked great. Also, the data type of CPU in the table is nvarchar.
Please help, this is a pivotal point in my project and is driving my against the wall.
THANK YOU!!!
-Gabe
I'm implementing a computer inventory system using ADO and python with SQL Server 2K. My problem is with the following code:
def lookupHdw( barcode ):
(hdwLook, success) = conn.Execute("SELECT emp FROM table1 WHERE CPU = " + barcode )
Response.Write( hdwLook.Fields("emp".Value )
lookupHdw( "HTS00002560" )
I'm using python with asp so i get the following error at runtime: "Invalid column name 'HTS00002560'". I've run this statement using SQL query analyzer and it worked fine.
I believe it's an issue with strings because i did a function identical to this one except with numeric values and not varchar's and it worked great. Also, the data type of CPU in the table is nvarchar.
Please help, this is a pivotal point in my project and is driving my against the wall.
THANK YOU!!!
-Gabe