I have the following query that worked on access databse with numeric field when we upgraded to SQL the field are now int fields and my query does not work properly any more below is the recordset. any ideas on how to fix it?
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_RS1_STRING
Recordset1.Source = "SELECT state, JobNumber, DictatorName, DictatorID, TranID, dtComplete, dtAtTran, JobLength, lExtraStatus, iPriorityLevel, TranName, SubjectName FROM Dictations WHERE DictatorName like '" + Replace(Recordset1__vardictator, "'", "''") + "' AND state like '" + Replace(Recordset1__varradio, "'", "''") + "' and TranName like '" + Replace(Recordset1__vartranName, "'", "''") + "' and jobnumber like '" + Replace(Recordset1__jbnumber, "'", "''") + "' ORDER BY jobnumber ASC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_RS1_STRING
Recordset1.Source = "SELECT state, JobNumber, DictatorName, DictatorID, TranID, dtComplete, dtAtTran, JobLength, lExtraStatus, iPriorityLevel, TranName, SubjectName FROM Dictations WHERE DictatorName like '" + Replace(Recordset1__vardictator, "'", "''") + "' AND state like '" + Replace(Recordset1__varradio, "'", "''") + "' and TranName like '" + Replace(Recordset1__vartranName, "'", "''") + "' and jobnumber like '" + Replace(Recordset1__jbnumber, "'", "''") + "' ORDER BY jobnumber ASC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()