not accepting more than 17 characters in text field

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


I have a form set up which collects details and then when submitted it
creates a new record in a table called rbh_vacancies

Most of the time it adds the records perfectly, but there seems to be a very
low number of characters it will accept in each field-

The following code updates the database-

myRS.Open "rbh_vacancies", myConn, adOpenKeyset, adOpenStatic
myRS("location_type") = Request.Form("location_type")
myRS("job_type") = Request.Form("job_type")
myRS("description") = Request.Form("description")
myRS("salary") = Request.Form("salary")
myRS("location") = Request.Form("location")
Set myRS = Nothing

"description" is a text area field, and will only be accepted if the field
is no more than 17 characters long, I have tried setting the database to be
text(255), varchar(255), medium text, long text, even tried BLOB. But I
cannot get it to accept more than 17 characters!

I can put more than 17 in if I update the record through a mySQL front end
tool, but not via the browser, does anyone have any ideas!? Could it be
something to do with the way I am creating the record set? - "myRS.Open
"rbh_vacancies", myConn, adOpenKeyset, adOpenStatic" ??

I am also having similar problems with the other fields, but I guess if I
can sort out the description field, I can sort out the others.



Re: not accepting more than 17 characters in text field

I'm not sure I explained that particularly well!

Basically - If my "description" field is 17 characters long, e.g.
12345678901234567 , it will update the database with the new record.

If I add an extra character to the description - 123456789012345678 , I get
the following error message-

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

Multiple-step OLE DB operation generated errors. Check each OLE DB status
value, if available. No work was done.

/admin/dbaseadd.asp, line 15


line 15 of the code is this-

myRS("description") = Request.Form("description")

Hope that makes more sense!



Re: not accepting more than 17 characters in text field

In case anyone ha a similar problem-

I've sorted it, thanks to the mySQL bugs documentation. There was an article
in their saying to add the following to the connection string-

; Option=3

Don't know why, but it works now!

Site Timeline