p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

asp_databases thread: ASP Database Update error


Message #1 by "chris kibbe" <christopher_kibbe@c...> on Thu, 7 Dec 2000 13:39:09 -0000
I have tried to use several books and online sources, but still can't make

it work.  I am using the pizzatown database and the code from the class.



I added an update link from the databrowser that passes the record id; as

we did in class, and it calls updatecustomer.asp.

Here is my code:



<---------

Dim ID

Dim conPizza		'ADODB.Connection

Dim rsCustomers	'ADODB.Recordset

Dim numPurchases, mySQL



Set conPizza = Server.CreateObject("ADODB.Connection")

conPizza.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51; Data

Source=" & server.MapPath("PizzaTown.mdb")

conPizza.Open 

Set rsCustomers = Server.CreateObject("ADODB.Recordset")

rsCustomers.CursorType = adOpenDynamic

rsCustomers.LockType = adLockOptimistic

ID=Request.QueryString("ID")

mySQL = "SELECT * FROM tblCustomers WHERE CUSTID= " & ID

Set rsCustomers= conPizza.execute(mySQL)

rsCustomers("FName") = request.form("txtFName")

rsCustomers("LName") = request.form("txtLName")

rsCustomers("City") = request.form("txtCity")

rsCustomers("LastOrder") = request.form("txtLastOrder")

rsCustomers("NumberPurchases") = request.form("txtNumPurch")

rsCustomers("RedFlag") = request.form("txtRedFlag")

rsCustomers("RedFlagMemo") = request.form("txtDetails")

rsCustomers.update

--------->



Here is my error:



ADODB.Field error '800a0cb3' 

The operation requested by the application is not supported by the

provider.

/webtest/updatecustomer.asp, line 25 



line 25 is -rsCustomers("FName") = request.form("txtFName")





Any ideas on how I can make this work?



Thanks



Chris Kibbe

christopher_kibbe@c...

CGU Foxborough

xxx-xxx-xxxx

Message #2 by =?iso-8859-1?Q?H=E5kan_Frennesson?= <hakan@c...> on Thu, 7 Dec 2000 15:41:44 +0100
Hi!



Did you make sure the form field name correspond to your request.form name

for that particular field?



Hakan



-----Original Message-----

From: chris kibbe [mailto:christopher_kibbe@c...]

Sent: den 7 december 2000 14:39

To: ASP Databases

Subject: [asp_databases] ASP Database Update error



I have tried to use several books and online sources, but still can't make

it work.  I am using the pizzatown database and the code from the class.



I added an update link from the databrowser that passes the record id; as

we did in class, and it calls updatecustomer.asp.

Here is my code:



<---------

Dim ID

Dim conPizza            'ADODB.Connection

Dim rsCustomers 'ADODB.Recordset

Dim numPurchases, mySQL



Set conPizza = Server.CreateObject("ADODB.Connection")

conPizza.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51; Data

Source=" & server.MapPath("PizzaTown.mdb")

conPizza.Open

Set rsCustomers = Server.CreateObject("ADODB.Recordset")

rsCustomers.CursorType = adOpenDynamic

rsCustomers.LockType = adLockOptimistic

ID=Request.QueryString("ID")

mySQL = "SELECT * FROM tblCustomers WHERE CUSTID= " & ID

Set rsCustomers= conPizza.execute(mySQL)

rsCustomers("FName") = request.form("txtFName")

rsCustomers("LName") = request.form("txtLName")

rsCustomers("City") = request.form("txtCity")

rsCustomers("LastOrder") = request.form("txtLastOrder")

rsCustomers("NumberPurchases") = request.form("txtNumPurch")

rsCustomers("RedFlag") = request.form("txtRedFlag")

rsCustomers("RedFlagMemo") = request.form("txtDetails")

rsCustomers.update

--------->



Here is my error:



ADODB.Field error '800a0cb3'

The operation requested by the application is not supported by the

provider.

/webtest/updatecustomer.asp, line 25



line 25 is -rsCustomers("FName") = request.form("txtFName")





Any ideas on how I can make this work?



Thanks



Chris Kibbe

christopher_kibbe@c...

CGU Foxborough

xxx-xxx-xxxx




  Return to Index