Advertisement

07.18.2008 at 05:34AM PDT, ID: 23576579
[x]
Attachment Details

MS ACCESS QUERY

Asked by lword in Access Forms, Microsoft Visual Basic.Net, SQL Query Syntax

I am using MS ACCESS as database and C# windows application..
While i am trying to insert a name with single quote(') access throws error.
Let me know about the syntax.

Thanks in advanceStart Free Trial
1:
2:
3:
string query="insert into table1(CODE,NAME,LOCATION,JOBNO) values ('" + strCode+"','"+strPrjName+"','"+strLocation+"','"+strJobNo+"')";
 
i have (') in strPrjName and strLocation
[+][-]07.18.2008 at 05:46AM PDT, ID: 22035119

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.18.2008 at 05:46AM PDT, ID: 22035121

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Access Forms, Microsoft Visual Basic.Net, SQL Query Syntax
Sign Up Now!
Solution Provided By: Thomasian
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628