I ran into an error when one of the search_name field values was O'leary because of the single quote. How can I avoid it but include it in the search?
Dim connectionString As String = "Data Source=AV-W12-ROMS-1;Initial Catalog=RESUMES;Integrated Security=True" Dim sql As String = "" Dim connection As New SqlConnection(connectionString) Dim cmd As New SqlCommand sql = "SELECT IsNull(COUNT(1),0) as 'count' FROM RESUMES.dbo.ftbl_resume_files WHERE CONTAINS([name],'" + search_name + "')" connection.Open() cmd.Connection = connection cmd.CommandText = sql name_count = cmd.ExecuteScalar() connection.Close()
|Scheduled IIS .Net2 AppPools recycle and SQL connection Hangs||33||88|
|Does SharePoint 2016 using SQL 2016 function correctly with Workflow Manager?||2||17|
|Getting max record but maybe not use Group BY||2||15|
|Hello Experts, Below query is not working on oracle. It works in SQL Server 2008. I am facing errors.||2||14|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
21 Experts available now in Live!