Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I hava written a code but this code does not working.
Please help me............
The code is like this.................


C#
string str = cmbProjctId.Text;
OleDbCommand cmd = new OleDbCommand("Delete Proj_dtls WHERE projectId=@id", con);
 cmd.Parameters.Add(new OleDbParameter("@id",str)); 

con.Open();
cmd.ExecuteNonQuery();
Posted
Updated 11-Jul-11 8:17am
v2
Comments
Uday P.Singh 11-Jul-11 12:56pm    
are you getting any error?
Mithlesh Shaw 11-Jul-11 21:15pm    
yes I am geting error.
Аslam Iqbal 11-Jul-11 14:18pm    
What/where is the problem?

1 solution

Make sure you are passing in the appropriate id value i.e. string or int.
 
Share this answer
 
v2
Comments
Mithlesh Shaw 11-Jul-11 21:13pm    
id value is string. but this doesn't work

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