7
Easy to use tips and articles on VB.NET
Wednesday, February 09, 2011Posted by admin
When the sql contains the single quotes then they have to be properly escaped otherwise it will give errors just pass the field value which you want to check and the following function will return you the properly escaped string. eg. o’brien will be returned as o”brien and this will not cause your sql to break. Function FixSql(ByVal sStr As String) As String FixSql = Replace(sStr, “‘”, “””) End Function
Comments
Comment#23 Friday, February 11, 2011 Posted by Sumeet Singh
Simple and easy articles on practical tips in using vb.net to develop windows and ASP.NEt applications.