I'm using ASP 3.0 and SQL Server 2000. I keep getting this error:
a.. Error Type:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
/databaseconect.asp, line 22
It seems to have to do with the lock or cursor type in SQL Server. Here is
my code. Please help
<%@ Language=VBScript %>
<%
strText = Request.Form("textfield")
Dim objconn1 'Connection Object
Dim strconn1
Set objConn1 = Server.CreateObject("ADODB.Connection")
strconn1 = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=Northwind;Data Source=SERVER\SERVER"
objconn1.Open strconn1
''Recordset Info
Set rs1 = Server.CreateObject("ADODB.Recordset")
rs1.Open "SELECT customername FROM Customer", objconn1, adOpenDynamic,
adLockOptimistic, adCmdText
rs1.AddNew
rs1.Fields("textfield") = strText
rs1.Update
%>