If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > SQl syntax problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-04-05, 04:31
oak12 oak12 is offline
Registered User
 
Join Date: Dec 2004
Posts: 22
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 07:19.
Reply With Quote
  #2 (permalink)  
Old 01-04-05, 05:57
Sreemace Sreemace is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 01-04-05, 07:18
oak12 oak12 is offline
Registered User
 
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)
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On