| |
bluntman
Posts: 1
Score: 0
Joined: 8/2/2001
From: Trinidad and Tobago
Status: offline
|
I'm creating a webpage that requires to update information on an oracle database. I'm using the ADO object to do this, but I am however running into problems. I'm testing the script on a local oracle database before I implement it onto the actual one. I'm getting the error "Arguements are of wrong type, are out of acceptable range, or are in conflict with one another." with the CursorLocation and LockType properties. However, the values are quite valid so it has left me dumbfounded. Here is the sample code: <HTML><HEAD> <TITLE>ADO Move Methods</TITLE></HEAD> <BODY> <FONT FACE="MS SANS SERIF" SIZE=2></font> <H3>ADO Move Methods</H3> <script language = "VBscript"> File = "ADOVBS.INC" Dim OBJdbConnection Dim RsCustomerList Dim NumRecs Dim strcnn Set OBJdbConnection = CreateObject("ADODB.Connection") strcnn = "provider = msdaora; password=tiger; user id=scott;" OBJdbConnection.CursorLocation = adUseClient OBJdbConnection.Open strcnn Set RsCustomerList = CreateObject("ADODB.Recordset") RsCustomerList.ActiveConnection = OBJdbConnection RsCustomerList.CursorType = adOpenDynamic RsCustomerList.LockType = adLockOptimistic RsCustomerList.Source = "EMP" RsCustomerList.Open RsCustomerList.MoveLast RsCustomerList.AddNew RsCustomerList("EMPNO") = "60" RsCustomerList.Update MsgBox(RsCustomerList.Fields(0)) NumRecs = RsCustomerList.RecordCount MsgBox("Customer Table has " & NumRecs & " Records") </script> </BODY> </HTML> Help will be greatly appreciated on this issue. Thanks, Kavir.
|
|