Then we get the following error
Microsoft VBScript compilation error '800a03ea'
Syntax error
/snworld/newsite/Global/DetailPublicVerify.asp, line 25
Recordset1.Source = "SELECT * FROM datahistory where Docket_No = '" + & HAWB + "'"
>>Naomi
>>
>>Don't you mean where Docket_No = '" + & HAWB + "'
>>
>>otherwise you have too many quote marks at the right hand side - or am I talking rubbish?
>>
>
>I meant a single quote inside the string, e.g.
>
>Docket_No ='" + Hawb + "'"
>
>
>assuming Hawb is a character value also.
>
>In other words, single quote inside the double quotes.
>
>If you must use string concatenation and can not use parameter. Hawb should not have a single quote inside it.
>
>
>>>If Docket_No is a character field, you need to include single quotes in the code, e.g.
>>>
>>>where Docket_No = '" + & HAWB + "'"
>>>
>>>>It looks like error comes from 'WHERE docket_no = ...'. What is field type for docket_no and what is the value of HAWB at the time of error?
>>>>
>>>>
>>>>set Recordset1 = Server.CreateObject("ADODB.Recordset")
>>>>
>>>>Recordset1.ActiveConnection = MM_Global_STRING
>>>>Recordset1.Source = "SELECT * FROM datahistorytemp WHERE docket_no = " & HAWB
>>>>
>>>>Recordset1.CursorType = 0
>>>>Recordset1.CursorLocation = 2
>>>>Recordset1.LockType = 3
>>>>Recordset1.Open()
>>>>
>>>>>
Specialist in Advertising, Marketing, especially Direct Marketing
I run courses in Business Management and Marketing