Hi all,
having a major headache with this problem.
Inside my SQL2000 table, there's a field with the value of "21" colour monitor". This row has an index of 3. Note that there is a double quotation mark in it.
when i want to search for this record, i use the following codes.
strSQL = "SELECT fielddesc FROM tblMonitior WHERE iIndex = 3"
Set rstChk = objConn.Execute(strSQL)
partDesc = rstChk("fielddesc"
'****this would give me the value of the description*****'
'*but when i want to use the description with the WHERE clause, like this*****'
strSQL = "SELECT * FROM tblMonitiors WHERE fielddesc = '" & partDesc & "'"
Set rstChkAgain = objConn.Execute(strSQL)
'*****no records is found*****'
does anybody has any idea why?? Any help is appreciated. Thanks.
xeno
having a major headache with this problem.
Inside my SQL2000 table, there's a field with the value of "21" colour monitor". This row has an index of 3. Note that there is a double quotation mark in it.
when i want to search for this record, i use the following codes.
strSQL = "SELECT fielddesc FROM tblMonitior WHERE iIndex = 3"
Set rstChk = objConn.Execute(strSQL)
partDesc = rstChk("fielddesc"
'****this would give me the value of the description*****'
'*but when i want to use the description with the WHERE clause, like this*****'
strSQL = "SELECT * FROM tblMonitiors WHERE fielddesc = '" & partDesc & "'"
Set rstChkAgain = objConn.Execute(strSQL)
'*****no records is found*****'
does anybody has any idea why?? Any help is appreciated. Thanks.
xeno