strange updating mysql question (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


crosscreek -> strange updating mysql question (3/8/2008 0:28:10)

I have a strange question.

I have set up a asp form to add a record to my database.

In mysql database I have

field "name" is set to TEXT
I tried to set it to varchar with Length 50, but still will not add.

The crazy thing is that I can only type in 15 letters/characters. If I go over 15 letters I get a Error message

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

Why would this be happening? I want the field to at least hold 30 to 40 characters/letters.

Very strange. Any ideas.




Spooky -> RE: strange updating mysql question (3/8/2008 1:23:06)

Does this apply?

http://databases.aspfaq.com/database/what-is-this-multiple-step-ole-db-error.html

How are you inserting?




crosscreek -> RE: strange updating mysql question (3/8/2008 2:01:55)

I'm using a pretty basic procedure. I am just adding a dog to the database. Once added people can upate the info.


I looked at the site you posted & I didn't see anything that was relative. Maybe the text where you add the variable at the start & don't change it.

But to test that I added 2 fields to the database

names --- varchar(50) Didn't work (added less then 15 char, but not over) same error as before

namesdog --- text (typed in 50)
[Microsoft][ODBC Driver Manager] Invalid string or buffer length


Below is the origional code

adddog.htm
<form method="POST" Action="adddog.asp">
<p><b>Add Dog:  <input type="text" name="doggy" size="50"></b></p><p> </p>
<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>

Adddog.asp page

<%


Dim objRS
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open "tbldog", myConn, , adLockOptimistic, adCmdTable

objRS.AddNew
objRS("name") = Request.form("doggy")
objRS.Update
Response.write "you have added the dog"
objRS.Close
Set objRS = Nothing
myConn.Close
Set myConn = Nothing
%>
Not much to the code...

No sure what to think about this







Spooky -> RE: strange updating mysql question (3/8/2008 3:29:54)

Try the 5th "IF" (AddNew/Update) and consdier the other method?




crosscreek -> RE: strange updating mysql question (3/8/2008 9:51:11)


quote:

ORIGINAL: Spooky Try the 5th "IF" (AddNew/Update) and consdier the other method?


Sorry..Not quite sure what you meant by 5th and other method




crosscreek -> RE: strange updating mysql question (3/8/2008 10:36:40)

Not sure what I did, but it works now. I manually added a dog with a longer name in the database & now I am able to add dogs.

Very strange....Thanks again for your time & help!!!

It's much appreciated. I promise I have figured out alot of stuff.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.078125