Click here to Skip to main content
15,908,675 members
Home / Discussions / Database
   

Database

 
GeneralRe: Image Column and File Group Pin
Michael Potter2-Aug-05 4:21
Michael Potter2-Aug-05 4:21 
GeneralRe: Image Column and File Group Pin
devvvy2-Aug-05 17:11
devvvy2-Aug-05 17:11 
GeneralDataSet Pin
Tiger4561-Aug-05 18:56
Tiger4561-Aug-05 18:56 
GeneralRe: DataSet Pin
Marc Soleda2-Aug-05 1:11
Marc Soleda2-Aug-05 1:11 
GeneralRe: DataSet Pin
toxcct3-Aug-05 5:19
toxcct3-Aug-05 5:19 
GeneralRe: DataSet Pin
Marc Soleda3-Aug-05 5:29
Marc Soleda3-Aug-05 5:29 
GeneralRe: DataSet Pin
Frank Kerrigan2-Aug-05 21:55
Frank Kerrigan2-Aug-05 21:55 
GeneralUPDATE cmd ASP.net Access 2k doesn't work Pin
xsoftdev21-Aug-05 9:17
xsoftdev21-Aug-05 9:17 
Hi folks,

My asp.net app is having trouble updating a table in Access 2K. I don't get any errors but the data is not updated. When I run the same query in Access Query IDE it runs fine. Any idea on what might be going on?

Thanks
Mike
private void btnSubmit_Click(object sender, System.EventArgs e)<br />
{<br />
// Create Instance of Connection and Command Object<br />
OleDbConnection myConnection = new OleDbConnection(ConfigurationSettings.AppSettings["ConnectionString"]);<br />
<br />
OleDbCommand myCommand = new OleDbCommand("UPDATE tblZtest SET PropertyType = " +<br />
	"@Type WHERE zTest = @PropertyID", myConnection);<br />
//			OleDbCommand myCommand = new OleDbCommand("qryzTestUpdate", myConnection);<br />
<br />
// Mark the Command as a SPROC<br />
//myCommand.CommandType = CommandType.StoredProcedure;<br />
myCommand.CommandType = CommandType.Text;<br />
<br />
// Add Parameters to SPROC<br />
OleDbParameter parameterPropertyId = new OleDbParameter("@PropertyID", OleDbType.Integer, 4);<br />
parameterPropertyId.Value = Convert.ToInt32(txtPid.Text);<br />
myCommand.Parameters.Add(parameterPropertyId);<br />
<br />
OleDbParameter parameterType = new OleDbParameter("@Type", OleDbType.Integer, 4);<br />
parameterType.Value = Convert.ToInt32(txtID.Text);<br />
myCommand.Parameters.Add(parameterType);		<br />
<br />
try <br />
{<br />
	myConnection.Open();<br />
	myCommand.ExecuteNonQuery();				<br />
	myConnection.Close();<br />
<br />
	<br />
	lblMessage.Text = "Done";<br />
<br />
	<br />
}<br />
catch ( OleDbException myException )<br />
{<br />
	string errorMessages = "";<br />
	for (int i=0; i < myException.Errors.Count; i++)<br />
	{<br />
		errorMessages += "Index #" + i + "\n" +<br />
			"Message: " + myException.Errors[i].Message + "\n" +<br />
			"NativeError: " + myException.Errors[i].NativeError + "\n" +<br />
			"Source: " + myException.Errors[i].Source + "\n" +<br />
			"SQLState: " + myException.Errors[i].SQLState + "\n";<br />
	}<br />
	lblMessage.Text = errorMessages;<br />
<br />
} // catch<br />
}

GeneralRe: UPDATE cmd ASP.net Access 2k doesn't work Pin
Frank Kerrigan3-Aug-05 1:21
Frank Kerrigan3-Aug-05 1:21 
GeneralRe: UPDATE cmd ASP.net Access 2k doesn't work Pin
Rob Graham4-Aug-05 5:08
Rob Graham4-Aug-05 5:08 
GeneralSQL Audit trail Pin
Alomgir Miah1-Aug-05 9:09
Alomgir Miah1-Aug-05 9:09 
GeneralRe: SQL Audit trail Pin
Colin Angus Mackay2-Aug-05 4:15
Colin Angus Mackay2-Aug-05 4:15 
GeneralRe: SQL Audit trail Pin
Alomgir Miah2-Aug-05 7:36
Alomgir Miah2-Aug-05 7:36 
GeneralRe: SQL Audit trail Pin
Colin Angus Mackay2-Aug-05 8:01
Colin Angus Mackay2-Aug-05 8:01 
GeneralRe: SQL Audit trail Pin
Alomgir Miah2-Aug-05 8:22
Alomgir Miah2-Aug-05 8:22 
GeneralDataRow Class and Insert command Pin
dwark1061-Aug-05 7:21
dwark1061-Aug-05 7:21 
GeneralComparing times (hh:mm:ss) in SQL Server Pin
Member 21613301-Aug-05 2:04
Member 21613301-Aug-05 2:04 
GeneralRe: Comparing times (hh:mm:ss) in SQL Server Pin
WoutL1-Aug-05 2:36
WoutL1-Aug-05 2:36 
GeneralRe: Comparing times (hh:mm:ss) in SQL Server Pin
andyharman1-Aug-05 5:25
professionalandyharman1-Aug-05 5:25 
GeneralRe: Comparing times (hh:mm:ss) in SQL Server Pin
Frank Kerrigan2-Aug-05 6:11
Frank Kerrigan2-Aug-05 6:11 
GeneralDataRow vs Business object Pin
WDI31-Jul-05 22:21
WDI31-Jul-05 22:21 
GeneralRe: DataRow vs Business object Pin
Colin Angus Mackay1-Aug-05 23:50
Colin Angus Mackay1-Aug-05 23:50 
GeneralRe: DataRow vs Business object Pin
WDI2-Aug-05 4:09
WDI2-Aug-05 4:09 
GeneralRe: DataRow vs Business object Pin
Colin Angus Mackay2-Aug-05 4:12
Colin Angus Mackay2-Aug-05 4:12 
GeneralRe: DataRow vs Business object Pin
Mohamad Al Husseiny2-Aug-05 16:16
Mohamad Al Husseiny2-Aug-05 16:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.