I am using Sql Server 2012.
In VB.NET, I have a situation where some of the data I am reading from a text file has double single apostrophes in the last name for a persons name.
The code eventually inserts the name into the database using a stored procedure.
My approach to fix the double single apostrophe issue is to replace the double single quote with the Ascii value equivalent of Char(39).
This work perfectly. Then a stored procedure is called to insert NameStr into a database table.
Dim NameStr As String = "O''Donnel"
Dim Apostrophe As Char = Char(39)
NameStr = NameStr.Replace("''",NameStr)
So based on my above approach, does anyone know if this would work for earlier versions of sql server, such as sql server 2000 or sql server 2005?
I don't have any version earlier than 2012, so I am not able to test for different versions.