-
Insert Data from a HTTPStream
Hi
I have a problem concerning streams. I get data from a http stream and I would like to store this stream in a sql server 2005 database. The stream contains quotes and double quotes, which makes it impossible to store this stream as ntext in the database (without redoubling the quotes). Is there a possibility to store such data in sql server 2005. I use vb.net 2005 and ado.net 2. Thanks a lot, Urs
-
Hi Dietrich
I know this may not be the method that you are looking for, but escaping the quotes will be an easy way to achieve your goal.
Assuming that you already have the HTML in a variable called strHTML simply substitute the single quotes. Double quotes does not need escaping since they are only being parsed by SQL server and not by VB.
mySQL = "INSERT INTO MY_TABLE (HTML_FIELD) VALUES('" & Replace(strHTML, "'","''") & "')"
Good luck
Cheers Mik
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|