Jun 3, 2003 #1 hugz Programmer Jun 3, 2003 8 GB hello, i am getting an error from my browser saying 'object required' on the line RS.Open sql, cnn where the sql and the cnn settings are correct coz i've used them in other scripts. please help as this is driving me insane thanks
hello, i am getting an error from my browser saying 'object required' on the line RS.Open sql, cnn where the sql and the cnn settings are correct coz i've used them in other scripts. please help as this is driving me insane thanks
Jun 3, 2003 #2 Genimuse Programmer May 15, 2003 1,797 US Is "RS" correctly defined as as recorset object? Upvote 0 Downvote
Jun 3, 2003 #3 pjames Programmer May 17, 2002 21 US Please post the rest of the script. Also make sure every object has been set. I personaly like to establish my recorset as follows... Dim strCon Dim strSQL Dim objRecordSet Set objRecordSet = Sever.CreateObject("ADODB.RecordSet" 'Pick One''''''''''''''''''''''''''''''''''''''' strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=yourdata.mdb;"'Access Connection 'strCon= "Provider=SQLOLEDB;Server=sqlServer;Uid=sa;Pwd=password;Database=yourdata" 'SQL Server Connection '''''''''''''''''''''''''''''''''''''''''''''''' strSQL = "SELECT * FROM YourTable" objRecordSet.ActiveConnection = strConn objRecordSet.Source = strSQL objRecordSet.CursorLocation = 3 objRecordSet.LockType = 3 objRecordSet.CursorType = 0 objRecordSet.Open objRecordSet.Close Upvote 0 Downvote
Please post the rest of the script. Also make sure every object has been set. I personaly like to establish my recorset as follows... Dim strCon Dim strSQL Dim objRecordSet Set objRecordSet = Sever.CreateObject("ADODB.RecordSet" 'Pick One''''''''''''''''''''''''''''''''''''''' strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=yourdata.mdb;"'Access Connection 'strCon= "Provider=SQLOLEDB;Server=sqlServer;Uid=sa;Pwd=password;Database=yourdata" 'SQL Server Connection '''''''''''''''''''''''''''''''''''''''''''''''' strSQL = "SELECT * FROM YourTable" objRecordSet.ActiveConnection = strConn objRecordSet.Source = strSQL objRecordSet.CursorLocation = 3 objRecordSet.LockType = 3 objRecordSet.CursorType = 0 objRecordSet.Open objRecordSet.Close