Click here to Skip to main content
15,921,467 members
Home / Discussions / Database
   

Database

 
GeneralRe: Question for an expert Transact SQL GURU! Pin
mozka28-Jan-04 8:00
mozka28-Jan-04 8:00 
GeneralRe: Question for an expert Transact SQL GURU! Pin
michanne28-Jan-04 13:33
michanne28-Jan-04 13:33 
GeneralRe: Question for an expert Transact SQL GURU! Pin
LizardWiz29-Jan-04 6:11
LizardWiz29-Jan-04 6:11 
GeneralRe: Question for an expert Transact SQL GURU! Pin
mozka29-Jan-04 6:52
mozka29-Jan-04 6:52 
GeneralRe: Question for an expert Transact SQL GURU! Pin
OMalleyW29-Jan-04 13:40
OMalleyW29-Jan-04 13:40 
Generalcreat table on sql Pin
samo7a27-Jan-04 12:26
samo7a27-Jan-04 12:26 
GeneralRe: creat table on sql Pin
Mazdak27-Jan-04 19:14
Mazdak27-Jan-04 19:14 
GeneralExecutiveNonQuery() returns 0 Pin
hkl27-Jan-04 11:53
hkl27-Jan-04 11:53 
I have a question about using ExecutiveNonQuery() in C# (using Access).
The following code would return 0, when I specify "@myMax".Value = 1 (see below).
However, if I changed @myMax to a constant (ie. not using a variable), everything worked fine and it returned 1 as the result.

The problem is that since it doesn't throw an exception, and only returns 0, I have no idea what's wrong with the "Update" SQL statement. Thank you and appreciate any feedbacks!!

// Updates the MAX, and NOTE field of a particular record <br />
<br />
OleDbCommand myUpdate = new OleDbCommand("UPDATE Product SET Prod_max = @myMax, Prod_desc = @myNote  WHERE Prod_id = @myID", oleDbConnection1);<br />
			<br />
myUpdate.Parameters.Add("@myNotes", OleDbType.LongVarWChar);<br />
myUpdate.Parameters.Add("@myID", OleDbType.VarChar);<br />
myUpdate.Parameters.Add("@myMax", OleDbType.SmallInt);<br />
			<br />
myUpdate.Parameters["@myNotes"].Value = Notestxtbox.Text.ToString();<br />
myUpdate.Parameters["@myID"].Value = ProdIDtxtbox.Text.ToString();<br />
myUpdate.Parameters["@myMax"].Value = 1;<br />
<br />
try<br />
{<br />
textBox1.Text = myUpdate.ExecuteNonQuery().ToString();<br />
}<br />
catch (Exception ex)<br />
{<br />
MessageBox.Show(ex.Message.ToString(), "Error", MessageBoxButtons.OK,MessageBoxIcon.Exclamation);<br />
}

GeneralSQL Query (on access) Pin
Jeremy Pullicino26-Jan-04 23:11
Jeremy Pullicino26-Jan-04 23:11 
GeneralRe: SQL Query (on access) Pin
Guillermo Rivero27-Jan-04 2:22
Guillermo Rivero27-Jan-04 2:22 
GeneralRe: SQL Query (on access) Pin
-Dr_X-27-Jan-04 2:28
-Dr_X-27-Jan-04 2:28 
GeneralSQL Server - sa password Pin
Kant26-Jan-04 10:04
Kant26-Jan-04 10:04 
GeneralRe: SQL Server - sa password Pin
Mazdak26-Jan-04 10:10
Mazdak26-Jan-04 10:10 
GeneralRe: SQL Server - sa password Pin
Kant26-Jan-04 11:19
Kant26-Jan-04 11:19 
Generaltry to get trigger_body over 32KB size Pin
yu-yu25-Jan-04 14:43
yu-yu25-Jan-04 14:43 
GeneralRe: try to get trigger_body over 32KB size Pin
Guillermo Rivero25-Jan-04 16:06
Guillermo Rivero25-Jan-04 16:06 
GeneralRe: try to get trigger_body over 32KB size Pin
yu-yu25-Jan-04 17:30
yu-yu25-Jan-04 17:30 
GeneralRe: try to get trigger_body over 32KB size Pin
Guillermo Rivero26-Jan-04 3:20
Guillermo Rivero26-Jan-04 3:20 
GeneralRe: try to get trigger_body over 32KB size Pin
yu-yu26-Jan-04 20:24
yu-yu26-Jan-04 20:24 
GeneralRe: try to get trigger_body over 32KB size Pin
Guillermo Rivero27-Jan-04 2:17
Guillermo Rivero27-Jan-04 2:17 
GeneralRe: try to get trigger_body over 32KB size Pin
yu-yu27-Jan-04 15:33
yu-yu27-Jan-04 15:33 
GeneralRe: try to get trigger_body over 32KB size Pin
yu-yu28-Jan-04 0:00
yu-yu28-Jan-04 0:00 
GeneralRe: try to get trigger_body over 32KB size Pin
Guillermo Rivero28-Jan-04 4:42
Guillermo Rivero28-Jan-04 4:42 
GeneralRe: try to get trigger_body over 32KB size Pin
yu-yu28-Jan-04 14:43
yu-yu28-Jan-04 14:43 
GeneralRe: try to get trigger_body over 32KB size Pin
Guillermo Rivero29-Jan-04 2:01
Guillermo Rivero29-Jan-04 2:01 

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.