Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP and MySQL Error 80040e21

Status
Not open for further replies.

gary2001

Programmer
Nov 28, 2001
1
GB
Hi,
I'm using Win98(IIS) and MySQL v3.23.44-max and i'm having a problem increasing the size of a field in a database. If I have a field with the data
hello
in it and try to add a character such as
helloo
I get the error,

Microsoft OLE DB Provider for ODBC Drivers error '80040e21'

Errors occurred

/westmarine/catalogue/modify_cart.asp, line 26

which really isn't a lot of help. The code i'm using to update the database is,
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")

objConn.ConnectionString = "Driver={MySQL};SERVER=localhost;DATABASE=data1"
objConn.Open

Dim objRS
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open "prod_details", objConn, , adLockOptimistic,adCmdTable
objRS("PROD_NAME") = Request.Form(textfield)

I've changed the objRS("PROD_NAME") = Request.Form(textfield) to objRS("PROD_NAME") = "helloo" to see if that made any difference but it didn't.
The actual field in the MySQL database is a VARCHAR(255) field so in theory it should be able to hold 255 characters but if there is data in the field and i try to change the data so it add one or more characters then i get the error. I don't get the error if the data entered is the same size or smaller than the original text entered.

This error has been troubling me for 3 days now i've searched the net high a low for an answer but just can't find one. Any help greatly appreciated.
Gary
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top