Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 data retrieve problem

Author  Topic 

jokxx
Starting Member

17 Posts

Posted - 2007-10-17 : 05:27:56
i've got a problem when i try to save strings that represent html tags. when ,for example, my viewgrid retrieve the data i looked at the source file and i get for instance & lt instead of < and & quot instead of ".
i save the data as varchar in the sql database. does anyone know what i'm suppose to do?

Kristen
Test

22859 Posts

Posted - 2007-10-17 : 05:52:43
Something OUTSIDE the database is making that conversion. (Either the Saving part or the subsequent Display part). The database will accurately store what it is given.

Kristen
Go to Top of Page

jokxx
Starting Member

17 Posts

Posted - 2007-10-17 : 06:00:07
maybe, i'm not sure. in the past i used access database and stored the string in that and when i retrieved from there i had no problem. maybe i nedd to change from varchar to something else? maybe i need to config something?
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-10-17 : 06:44:09
Nope, varchar is all you need. This is definitely NOT happing within SQL Server. But I can't offer much help as to what might be causing it.

In what way has your application changed in moving the data storage from Access to SQL Server?

Kristen
Go to Top of Page

jokxx
Starting Member

17 Posts

Posted - 2007-10-17 : 06:50:51
in access i just used text type. maybe it's something i need to config in the .net?
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-10-17 : 07:11:28
If ALL you have changed is the connection string - so database has moved from Access to SQL Server, but application remainded the same, I'm struggling to see what would cause this.

If you have made more major changes then it could be a config thing. Maybe something thinks it is using an XML transport layer, and so is encoding < to < and so on.
Go to Top of Page
   

- Advertisement -