Parameter has no walue
Posted
by Simon
on Stack Overflow
See other posts from Stack Overflow
or by Simon
Published on 2010-06-15T12:25:20Z
Indexed on
2010/06/15
14:12 UTC
Read the original article
Hit count: 264
string queryString = "SELECT SUM(skupaj_kalorij)as Skupaj_Kalorij "
+ "FROM (obroki_save LEFT JOIN users ON obroki_save.ID_uporabnika=users.ID)"
+ "WHERE users.ID= " + a.ToString() + " AND obroki_save.datum =?";
using (OleDbCommand cmd = new OleDbCommand(queryString,database))
{
cmd.Parameters.Add("@datum", OleDbType.Char).Value = DateTime.Now.ToShortDateString();
}
Why doesn't the parametr datum get the date value? (the value of at least one complex parameter has not been determined )
© Stack Overflow or respective owner