Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2004
    Posts
    22

    Unanswered: SQl syntax problem [Resolved]

    Hi I'm hoping someone can help. I try to excute the below query in a small VB.net program.

    INSERT INTO calls (CallID, ContactID, CallDate, CallTime, Callername, Notes, CallerCompany, ActionTakenID, EmployeesID, ShortMessage, CallerNumber, Charged, OperatorID, DDI) Values (1616389, 644, '2005-01-04', '1899-12-30 09:10:21', "Gillian", "Voicemail message 4/1/05 @ 6.50am

    Gillian called.

    She called Mrs Thompson on Saturday and left a message to say that she is willing to go forward, but has not heard anything back.

    She is on her way and will call you from there this afternoon.

    Telephone; .", "", 2, 2855, "Message For Sam 09:08:35 on 04/01/2005", '', -1, 25, '8667')


    It errors out with the below message. I don't understand though as it all seems fine, and very simialr queries, eg just the contents of the messages are different.

    An unhandled exception of type 'MySql.Data.MySqlClient.MySqlException' occurred in mysql.data.dll

    Additional information: You have an error in your SQL syntax near '"Voicemail message 4/1/05 @ 6.50am

    Gillian called.

    She called Mrs Thompson' at line 1
    Last edited by oak12; 01-04-05 at 08:19.

  2. #2
    Join Date
    Dec 2004
    Posts
    47
    Just check two things here.....

    1) the length of Notes feild.
    2) try to take off the special characters from the sentance u have given & try.....

    I tried inserting the same notes value in MYSQL but it doesnt have any probs.... either DLL is interpreting wrongly any of the special character or Length of the Notes feild is creating problem...

    Check & let me know... if its working...

    Sree

  3. #3
    Join Date
    Dec 2004
    Posts
    22

    Thanks

    Thanks is working now, the dll for some reason doesn't like ; in the string. Am just replacing all ; with : now. As I don't know the difference between them anyway (English not being my strong point)

Posting Permissions

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