C# Select Query Failed with no errors -


i'm having trouble simple select query, cannot see why isn't working.

here code:

conn.open();  string getpayrollquery = "select payrollno [employee] (firstname + ' ' + lastname) = @name";     oledbcommand getpayroll = new oledbcommand(getpayrollquery, conn);  getpayroll.parameters.addwithvalue("@name", oledbtype.varchar).value = cbbemployees.text;  var gotpayroll = getpayroll.executenonquery();  messagebox.show(gotpayroll.tostring());  return convert.toint32(gotpayroll); 

the code runs fine isn't extracting data. can see why be?

i bet @name coming "mikesmith" instead of "mike smith".


Comments