Ask a Question related to ASP Database, Design and Development.

  1. #21

    Default Re: Insert Error

    Dan Bracuk,

    We're not talking about an OLE connection here. The OP's code and error messages on this and their other thread indicate they are using ODBC.

    mxstu Guest

  2. Similar Questions and Discussions

    1. Need Help with Record Insert Error
      Hi Coldfuschions, I am a novice and am trying to use the Record Insertion Form Wizard in D8/ColdFusion to add a record to a MS Access database. ...
    2. SQL Insert Error
      Any ideas on why the below doesn't work? I keep getting this error message????? ---> "Object must implement IConvertible". Private Sub...
    3. ERROR: Please insert CD-ROM
      Why does the program keep asking me to insert the CD? I thought I downloaded it to my harddrive but now acts like it won't work unless, I keep the...
    4. Insert error :: must be updateable?
      I am picking up the following error message which is strange as it has only started happening since I have transferred servers: Microsoft JET...
    5. asp insert error
      hi, I made a asp form to insert product in a db. on my localhost everything works just fine. But online i got the : Microsoft OLE DB Provider...
  3. #22

    Default Re: Insert Error

    The data types are as follows:
    User_id = text
    First_name = text
    Middle_name = text
    Last_name = text
    Gender = Yes/No
    Occupation = text
    DOB = Date/time
    Cnsmr_Password = text
    Cnsmr_PasswordHint = text
    Date_created = Date/time

    I see you mention that my Gender field may be yes/no and not text. Why won't
    access (coldfusion) accept yes/no? TIA

    Abdlah Guest

  4. #23

    Default Re: Insert Error

    It will accept it, but when you put single quotes around the value, it will be
    treated as "text" and not boolean (yes/no , true/false). So use something like

    VALUES ( ....., #YesNoFormat(Form.gender)#, .... )

    Although I think you can also use 0/1 or true/false (without single quotes).





    mxstu Guest

  5. #24

    Default Re: Insert Error

    Yes that gender definition as yes/no was the problem. So a big thanks. But, I am wondering why yes/not is not acceptable since this is what is being submitted? Thanks again:D
    Abdlah Guest

  6. #25

    Default Re: Insert Error

    You're welcome.

    It is acceptible. You just needed to remove the single quotes. Single quotes
    cause the access db engine to see the values as "text" and not boolean. Since
    inserting a "TEXT" value into a "YES/NO" column is not allowed, the db engine
    throws a data type mismatch error.

    So use:
    INSERT INTO yourTable (yourYesNoColumn) VALUES (YES )

    .. and do not use ...
    INSERT INTO yourTable (yourYesNoColumn) VALUES ('YES' ) <--- Note the single
    quotes



    mxstu Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139