Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: sql error

  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 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
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,047
    Thanks
    0
    Thanked 251 Times in 247 Posts
    can you post the SQL statement executed and also the data type of each of the field.

  • #3
    New Coder
    Join Date
    Jun 2002
    Location
    Pilipinas
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  • #5
    New Coder
    Join Date
    Jun 2002
    Location
    Pilipinas
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts
    In MS Access 2000, you can use either Yes/No, True/False, or On/Off for logical fields.


  •  

    Posting Permissions

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