When using named parameters in an SQL statement called by an OracleCommand of CommandType.Text, you must precede the parameter name with a colon . However, in a stored procedure, or when referring to a named parameter elsewhere in your code (for example, when adding OracleParameter objects to the Parameters property), do not precede the named parameter with a colon. The .NET Framework Data Provider for Oracle supplies the colon automatically.
Also rather than execute a reader why not use scalar as COUNT returns a single value test it non-zero.
I have created game with signs.Computer randomly select random combination of four signs to be found.User click button with sign and clicked sign appears in pictureBox.How to make to remove sign in pictureBox when user clicks on it and let him select sign from button again ?
I added this to pictureBox click.I click button with sign and it appears inside pictureBox,after that I click pictureBox image is removed,after I click other button with sign again it adds two images,in first pictureBox it adds image that was removed and in second pictureBox adds image that I clicked instead of just adding image that I clicked to first pictureBox !!!
That error is telling you that he cannot convert DR object type to int.
DR type is SQLDataReader, you cannot convert data reader to int.
Why fill "vochcombox" twice?
While loop should work, but foreach doesn't for sure.
I first learned C# then C. As I've been working in C a lot lately, I've had to do without classes obviously since it's not really an OOP language.
I've gotten rather accustomed to passing stuff in as arguments and I'm writing a C# program right now where I've been passing "state" around via the method arguments rather than the typical storing fields/properties on the class and then accessing them from the class methods. Is there anything "wrong" about doing this? Is there anything "wrong" with not using the constructor to initialize member variables to certain values and instead just using a function in the class that calls the other business functions? E.G.
someObject myObject = new someObject();
var processResult = myObject.process(someString,Processor_Option_1);
someObject myObject = new someObject(someString,Processor_Option_1);
var processResult = myObject.result;
Note: Option 2 also uses class state member variables whereas 1 just passes it function-to-function as argument.
Last Visit: 31-Dec-99 18:00 Last Update: 28-Sep-23 11:50