-
ADODB.Field error '800a0cb3'
I get this error when trying to save a new value to
a SQL server 7 table.
******************************************
ADODB.Field error '800a0cb3'
The operation requested by the application
is not supported by the provider.
******************************************
' Connection and Recordset get created OK
' SQLOLEDB is provider
' below is my connection string....works ok
strSQLOLEDB="Provider=SQLOLEDB.1;User ID=" & Session("LoginName") & ";Password="
& Session("LoginPass") & ";Initial Catalog=InSource;Data Source=Jupiter4"
***************************************************
<%
Set objConn1=Server.CreateObject("ADODB.Connection")
objConn1.ConnectionString = strSQLOLEDB
objConn1.CursorLocation = adUseClient
objConn1.Open
Set objCmd1=Server.CreateObject("ADODB.Command")
objCmd1.ActiveConnection = objConn1
objCmd1.CommandType = adCmdStoredProc
objCmd1.CommandText = "spDetail"
Set objParam=Server.CreateObject("ADODB.Parameter")
objParam.Name = "xNDC"
objParam.Type = adVarChar
objParam.Size = 11
objParam.Direction = adParamInput
objParam.Value = Trim(Request.QueryString("myNDC"))
objCmd1.Parameters.Append objParam
Set objRst1=Server.CreateObject("ADODB.Recordset")
objRst1.CursorType = adOpenKeyset
objRst1.LockType = adLockOptimistic
Set objRst1 = objCmd1.Execute
%>
***************************************************
***************************************************
Sub Button1_onclick()
objRst1("HosPrice").Value = 15 ' <-- Error happens here
objRst1("SurPrice").Value = 15
objRst1.Update
End Sub
***************************************************
-
Re: ADODB.Field error '800a0cb3'
"Jeff" <jeffm@earthlink.net> wrote:
>
>I get this error when trying to save a new value to
>a SQL server 7 table.
>
>******************************************
>ADODB.Field error '800a0cb3'
>
>The operation requested by the application
>is not supported by the provider.
>******************************************
>
Your ADO objects' property settings seem correct; you don't appear to be
dealing with a read-only record set, which is usually the case when you get
this error (wrong cursor or locking settings). I suggest examining the record
and table-level permissions on your SQL server. Try running a little update
query right from SQL and see if your db lets you update or add a record.
--steve
>
>
>
>
>' Connection and Recordset get created OK
>' SQLOLEDB is provider
>' below is my connection string....works ok
>strSQLOLEDB="Provider=SQLOLEDB.1;User ID=" & Session("LoginName") & ";Password="
>& Session("LoginPass") & ";Initial Catalog=InSource;Data Source=Jupiter4"
>
>
>***************************************************
><%
>
>Set objConn1=Server.CreateObject("ADODB.Connection")
>objConn1.ConnectionString = strSQLOLEDB
>objConn1.CursorLocation = adUseClient
>objConn1.Open
>
>Set objCmd1=Server.CreateObject("ADODB.Command")
>objCmd1.ActiveConnection = objConn1
>objCmd1.CommandType = adCmdStoredProc
>objCmd1.CommandText = "spDetail"
>
>Set objParam=Server.CreateObject("ADODB.Parameter")
>objParam.Name = "xNDC"
>objParam.Type = adVarChar
>objParam.Size = 11
>objParam.Direction = adParamInput
>objParam.Value = Trim(Request.QueryString("myNDC"))
>objCmd1.Parameters.Append objParam
>
>Set objRst1=Server.CreateObject("ADODB.Recordset")
>objRst1.CursorType = adOpenKeyset
>objRst1.LockType = adLockOptimistic
>
>Set objRst1 = objCmd1.Execute
>
>%>
>***************************************************
>
>
>
>***************************************************
>Sub Button1_onclick()
>
> objRst1("HosPrice").Value = 15 ' <-- Error happens here
> objRst1("SurPrice").Value = 15
>
> objRst1.Update
>
>End Sub
>***************************************************
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks