Click here to Skip to main content
15,910,234 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello I have a problem in converting this line from vb to c# I don't who whats the error exactly.
VB
cmdSQL.Parameters("p_return").Value = 0




I converted like that :
C#
cmdSQL.Parameters("p_return").Value == 0


and this I the error which appear for me :
'System.Data.OleDb.OleDbCommand.Parameters' cannot be used like a method.
Posted

1 solution

C#
Instead of 
cmdSQL.Parameters("p_return").Value == 0
you can use
cmdSQL.Parameters.AddWithValue("p_return",0);
 
Share this answer
 
Comments
Hesham el Masry 16-Jan-15 5:45am    
thank you its working now
Jeet Gupta 19-Jan-15 3:30am    
your welcome..ny more question feel free to ask.
Hesham el Masry 19-Jan-15 3:59am    
sure thank you so much

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