使用单引号插入查询 [英] Insert a query by using single quote
本文介绍了使用单引号插入查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用单引号插入查询.
假设Employee是一个表,Ename是列.
如何在Ename列中插入Jagan的采访
Insert a query by using single quote .
Suppose Employee is a table, Ename is column.
How you will insert Jagan''s Interview in Ename column
推荐答案
您必须像这样消除单引号:
Jagan''''s Interview
You have to deliminate the single quote like this :
Jagan''''s Interview
不要重新发布您的问题.您已经提出了相同的问题&得到了很多答案.检查
编写要插入的查询 [
Don''t repost your question. Already you have asked the same question & got many answers. Check that
Write query to insert[^]
我希望您知道如何连接使用SQL Databse
使用以下查询将值插入SQL数据库.
I hope you know how to Connect with SQL Databse
Use the following query to insert value into SQL database.
"Insert into Employee(Ename) values(@Ename);"
'objda is SqlDataAdapter Object
objda.SelectCommand.Parameters.AddWithValue("@Ename", "Jagan's Interview")
Try
objda.SelectCommand.ExecuteNonQuery() 'Executing the Query
Catch ex As Exception 'Catching Exception
MessageBox.Show("Unable to Save") 'Error in Saving Record
End Try
这篇关于使用单引号插入查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文