Web Analytics Made Easy -
StatCounter sql error - CodingForum

Announcement

Collapse
No announcement yet.

sql error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • sql error

    when i insert new record in my db ,i found meny errors because of the type of data, for examble i insert (roomnumber)by '"&rnum&"'
    it gives me an error because i added one more single qutation.
    i maen each data type has defferent format in sql,where i can found referance for this.note that iam using access, and my table has text,memo,number,yes/no and curency.

  • #2
    can you post the SQL statement executed and also the data type of each of the field.
    Glenn
    vBulletin Mods That Rock!

    Comment


    • #3
      hi, just to expound on Dave's input.

      You can use any valid expression to determine which records the SQL statement returns. The where filter can take any of the forms in the following examples.

      String values are delimited with single quotes

      strSQL="SELECT . . . WHERE State='CA'"

      while numeric values are stated as numbers that can contain decimals.

      strSQL="SELECT . . . WHERE Payments.Amount >= 1000"

      Date literals must be in U.S. format. A date literal is any sequence of characters with a valid format that is delimited by a hash sign (#).

      strSQL="SELECT . . . WHERE Orders.ShipDate <= #12/31/01#"

      Whilst the above are SELECT examples, they apply to INSERT, UPDATE, and whatever SQL as well.
      aspxtreme

      Comment


      • #4
        to dave

        it's ok but if i enter the string "yes" in field(yes/no)type instead of true or false will it work?
        thank you for all

        Comment


        • #5
          In MS Access 2000, you can use either Yes/No, True/False, or On/Off for logical fields.
          aspxtreme

          Comment

          Working...
          X