M
Matt
Hi all,
I'm trying to use the following code in an application:
// retrieve the connection string
string strDbcx = Globals.strDbcx;
// create the connection
OleDbConnection dbcx = new OleDbConnection(strDbcx);
// open the connection
dbcx.Open();
string sqlComplete;
DateTime confirmedDate = DateTime.Now;
sqlComplete = "UPDATE installs SET installConfirmed =
1,installDateConfirmed = confirmedDate WHERE installId = " +
lsbSelectInstallToClose.SelectedValue.ToString();
OleDbCommand cmdCompleteInstall = new
OleDbCommand(sqlComplete, dbcx);
cmdCompleteInstall.ExecuteNonQuery();
/*MessageBox.Show(sqlComplete);
OleDbCommand cmdCompleteInstall = new
OleDbCommand(sqlComplete, dbcx);
cmdCompleteInstall.ExecuteNonQuery();*/
dbcx.Close();
however I get the following error:
System.Data.OleDb.OleDbException was unhandled
Message="No value given for one or more required parameters."
The connection string works across the rest of my application, so why
won't it work here?!!
Thanks in advance,
Matt
I'm trying to use the following code in an application:
// retrieve the connection string
string strDbcx = Globals.strDbcx;
// create the connection
OleDbConnection dbcx = new OleDbConnection(strDbcx);
// open the connection
dbcx.Open();
string sqlComplete;
DateTime confirmedDate = DateTime.Now;
sqlComplete = "UPDATE installs SET installConfirmed =
1,installDateConfirmed = confirmedDate WHERE installId = " +
lsbSelectInstallToClose.SelectedValue.ToString();
OleDbCommand cmdCompleteInstall = new
OleDbCommand(sqlComplete, dbcx);
cmdCompleteInstall.ExecuteNonQuery();
/*MessageBox.Show(sqlComplete);
OleDbCommand cmdCompleteInstall = new
OleDbCommand(sqlComplete, dbcx);
cmdCompleteInstall.ExecuteNonQuery();*/
dbcx.Close();
however I get the following error:
System.Data.OleDb.OleDbException was unhandled
Message="No value given for one or more required parameters."
The connection string works across the rest of my application, so why
won't it work here?!!
Thanks in advance,
Matt