|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Apostrophe Problem - HELPrecently we upgraded our database server to SQL 2005 x64 in my code i run mystring= Replace(mystring, "'", "''") to replace any single apostrophes with 2 apostrophes in the last couple of weeks its actually started storing 2 apostrophes in the database e.g Mike's stores into the database as Mike''s it never did this before and im totally baffelled as to why its happening any help would be greatly appreciated Thanks Mike Are you talking about an INSERT command?
Can you show the code lines where you do that ? -T Mike Fellows ha scritto: Show quoteHide quote > I have a database with a vb.net frot end that I have used forever > > recently we upgraded our database server to SQL 2005 x64 > > > in my code i run > > mystring= Replace(mystring, "'", "''") > > to replace any single apostrophes with 2 apostrophes > > in the last couple of weeks its actually started storing 2 apostrophes in > the database > > e.g Mike's stores into the database as Mike''s > > it never did this before and im totally baffelled as to why its happening > > any help would be greatly appreciated > > Thanks > > Mike > e.g Mike's stores into the database as Mike''s How does it look when it comes out of the database, such as using a> SELECT? does a SELECT return "Mike's" or "Mike''s"? Mike Fellows wrote:
> in the last couple of weeks its actually started storing 2 If you're using an INSERT or UPDATE statement, take a look at the SQL you're > apostrophes in the database actually executing. Make sure the quotes haven't been doubled up twice, which would result in the behaviour you describe. If you're putting the values into a DataTable, don't double up the apostrophes at all -- the DataAdapter object will take care of doing anything like this that is required for you automatically. HTH, -- (O)enone
Embedding a newline in a vb.net string constant
convet date format Why does the the program not quit in this case? task manager, app doesn't unload Best way to handle interface and Forms MDI Parent Forms Exe Size Excel dll on computer whitout offices Visual Basic 2005 - ContextSwitchDeadLock was detected when debugging VB.NET Problem: Setting the Mask and Picture Properties on a CommadBar without "LoadPicture"??? |
|||||||||||||||||||||||