Results 1 to 4 of 4

Thread: Cryptic error message - need help tracking it down!

  1. #1
    matthewralston
    Guest

    Question Cryptic error message - need help tracking it down!

    I'm getting a very cryptic error message from ADO (running through ASP):

    Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
    If occurs halfway through adding a record or updating an existing one.

    I just can't for the life of me work out what the error is trying to tell me. I've looked through the connection, recordset and error objects' errors collection but they only contain the message above. Does anyone know how to "Check each OLE DB status value"?

    For what it's worth the code is as follows, although I don't think the problem is related directly to the code.

    Code:
    oRS.Open "SELECT * FROM Auth WHERE Login_ID='" & sICUser & "';", oConn, adOpenDynamic, adLockOptimistic
    		
    If oRS.BOF And oRS.EOF Then
    	oRS.AddNew
    	oRS("Acct_number") = GetLastAcct_Number ' Function to get the next available ID
    End If
    
    If sICUser = sUsername Then sICUser = Make_IC_Username
    		
    oRS("Login_ID") = sICUser
    oRS("Password") = sPasswd_1
    oRS("Account_Status") = "enabled"
    oRS("Service") = sService
    oRS("EmailAdd") = sUsername & "@" & sDomain
    oRS("Title") = sTitle	
    oRS("Firstname") = sFirstname
    oRS("Surname") = sSurname
    oRS("Dayofbirth") = iDob_Day
    oRS("Monthbirth") = iDob_month
    oRS("Yearbirth") = iDob_year
    oRS("Addressl1") = sAddress_1
    oRS("Addressl2") = sAddress_2
    oRS("Town") = sTown
    oRS("County") = sCounty
    oRS("Postcode") = sPostcode
    oRS("Telephone") = sTelephone
    oRS("CustGender") = sGender
    oRS("AccStatus") = "y"
    oRS("Mobile") = sMobile
    oRS("UseMobile") = bUse_Mobile
    oRS("ContactEmail") = sOldUsername & "@" & sDomain
    oRS("DateSign") = GetGoodDate ' Function to make a date that the DB likes
    oRS("SecurityQU") = sSec_Ques
    oRS("SecurityAnswer") = sSec_Answ
    oRS("Arts_and_Culture") = "n"
    oRS("Automotive") = "n"
    oRS("Computing") = "n"
    oRS("Education_and_Jobs") = "n"
    oRS("Entertainment") = "n"
    oRS("Finance") = "n"
    oRS("Food_and_Drink") = "n"
    oRS("Health_and_Fitness") = "n"
    oRS("Home_and_Family") = "n"
    oRS("Internet") = "n"
    oRS("Kids") = "n"
    oRS("Men") = "n"
    oRS("News_and_Weather") = "n"
    oRS("Recreation") = "n"
    oRS("Shopping") = "n"
    oRS("Sport") = "n"
    oRS("Travel") = "n"
    oRS("Women") = "n"
    oRS.Update
    		
    oRS.Close
    Set oRS = Nothing

  2. #2
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    It could possibly be that you are adding a value that's wrong for the underlying datatype of the database field - I've run into that when "normalizing" Access dbs for import into MS SQL. I'm just guessing, though.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  3. #3
    matthewralston
    Guest
    Yeah, I read an article somewhere that hinted around that area. It can sometimes occur when trying to stuff a value that is too big for the db field that it's trying to go into.

    Which puzzles me more. The error is generated on the line:

    Code:
    oRS("CustGender") = sGender
    Now CustGender is a varchar(1) and sGender contains either a "m" of an "f". So as I see it I'm trying to put a string of length 1 into a char field.
    I've tried using Trim(sGender) but to no avail, and Char(sGender) gives me a type mismatch!!!

  4. #4
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Well, you could try peeking at stuff like oRS.Fields("CustGender").Type , etc, and see what ADO thinks it is.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width