Inserting Large string into SQL Server Database? [Resolved]
I'm writing a Web Service in vb.net to encapsulate all the database logic and have got almost everthing working except that i get an error when i try to insert a large html formmated string using SQL.
Code:
INSERT INTO Data_Lyrics (SongID, DateCreated, RevisionNumber, Lyrics) VALUES ('782', '10/17/2004', '1', 'I am .....')
I shortend Lyrics as it is about 1000 chars long, it contants html formatted text (basicly only "<br />")
Exception:
Code:
System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near 'm'.
Cannot use a BREAK statement outside the scope of a WHILE statement.
Cannot use a BREAK statement outside the scope of a WHILE statement.
Cannot use a BREAK statement outside the scope of a WHILE statement.
Cannot use a BREAK statement outside the scope of a WHILE statement.
Cannot use a BREAK statement outside the scope of a WHILE statement.
is <br /> conflicting w/ a sql reverved word? if so, how can i ecsape it?
EDIT:
My problem was that the string i was inserting contained a " ' ".
I escaped the ' and everything is working fine, prolly going to move over to stored producures tho.