|
| |
|
|
crosscreek
Posts: 107 Joined: 2/5/2008 Status: offline
|
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.
|
|
|
|
crosscreek
Posts: 107 Joined: 2/5/2008 Status: offline
|
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
|
|
|
|
crosscreek
Posts: 107 Joined: 2/5/2008 Status: offline
|
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
Posts: 107 Joined: 2/5/2008 Status: offline
|
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.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|