Click here to Skip to main content
15,904,935 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i place \ before the double code but it is not coming plz help me
Posted
Comments
Rakesh From Patna 23-Jul-11 5:53am    
what you try. if possible you share your code.
walterhevedeich 23-Jul-11 5:54am    
Can you post the code that you are using to insert to the database?
Herman<T>.Instance 23-Jul-11 7:27am    
you have to place "\"" to have 1 " inserted in your database
RaviRanjanKr 23-Jul-11 8:33am    
Please show your code.

C#
string SqlString = "Insert Into Contacts (FirstName, LastName) Values (?,?)";
using (OleDbConnection conn = new OleDbConnection(ConnString))
{
  using (OleDbCommand cmd = new OleDbCommand(SqlString, conn))
  {
    cmd.CommandType = CommandType.Text;
    cmd.Parameters.AddWithValue("FirstName", txtFirstName.Text);
    cmd.Parameters.AddWithValue("LastName", txtLastName.Text);
    conn.Open();
    cmd.ExecuteNonQuery();
  }
}


Try this.
 
Share this answer
 
v2
SQL
INSERT INTO Extn ( ID )
VALUES ('"hhhh"');
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900