sqlStatement = "select Price from OrderItem where orderId=" + orderId;
myAccessCommand = new OleDbCommand(sqlStatement, myAccessConn);
myDataAdapter = new OleDbDataAdapter(myAccessCommand);
myDataAdapter.Fill(myDataSet, "OrderItem");`DataTableCollection dta = myDataSet.Tables;
DataColumnCollection drc = myDataSet.Tables["Orders"].Columns;
DataRowCollection dra = myDataSet.Tables["Orders"].Rows;
foreach (DataRow dr in dra)
{
orderId= dr[0].ToString();
Checkintime= dr[1].ToString();
RoomPrice= dr[2].ToString();
ReceiptNo= dr[3].ToString();
Console.WriteLine("orderId: " + orderId + ", Checkintime: " + Checkintime + ", RoomPrice: " + RoomPrice + ", ReceiptNo: " + ReceiptNo + "");
}`
I have a syntax error which says "Syntax error (missing operator) in query expression 'orderId='."}
I cant seem to find the error.
orderIdcolumn?parametersin your query