Click here to Skip to main content
15,899,026 members
Home / Discussions / Database
   

Database

 
GeneralSqlDataAdapter.Update sometimes does not update Pin
james-cxx2-Oct-03 10:55
james-cxx2-Oct-03 10:55 
GeneralRe: SqlDataAdapter.Update sometimes does not update Pin
james-cxx14-Oct-03 18:18
james-cxx14-Oct-03 18:18 
GeneralLogic Pin
Anonymous2-Oct-03 3:58
Anonymous2-Oct-03 3:58 
GeneralRe: Logic Pin
Mike Dimmick2-Oct-03 12:14
Mike Dimmick2-Oct-03 12:14 
GeneralWeird problem while inserting a record Pin
2sky1-Oct-03 23:53
2sky1-Oct-03 23:53 
GeneralRe: Weird problem while inserting a record Pin
Mike Dimmick2-Oct-03 3:26
Mike Dimmick2-Oct-03 3:26 
GeneralRe: Weird problem while inserting a record Pin
2sky2-Oct-03 3:35
2sky2-Oct-03 3:35 
Generalerror deleting record in datagrid Pin
Giovanni Bejarasco1-Oct-03 23:09
Giovanni Bejarasco1-Oct-03 23:09 
Hi
I have a datagrid bound to a dataset. I can insert and update thru the grid but a delete returns the following message (through OleDbException.Message)

"Incorrect syntax near the keyword DEFAULT"

This is thown when I call the OleDbDataAdapter.Update() method using my dataset as the target. The following is my code for the delete command of the dataAdapter:
<br />
string sql = "DELETE FROM Product " +<br />
	     "WHERE productID = ? AND desription = ? AND " +<br />
	     "cost = ? AND srp = ?";<br />
<br />
OleDbCommand cmd = new OleDbCommand(sql, cn);<br />
<br />
OleDbParameterCollection pc = cmd.Parameters;<br />
OleDbParameter param;<br />
param = pc.Add("ProductID", OleDbType.Integer, 0, "prouctID");<br />
param.SourceVersion = DataRowVersion.Original;<br />
param = pc.Add("Description", OleDbType.VarChar, 50, "description");<br />
param.SourceVersion = DataRowVersion.Original;<br />
param = pc.Add("Cost", OleDbType.Currency, 0, "cost");<br />
param.SourceVersion = DataRowVersion.Original;<br />
param = pc.Add("SRP", OleDbType.Currency, 0, "srp");<br />
param.SourceVersion = DataRowVersion.Original;<br />

GeneralRe: error deleting record in datagrid Pin
Mike Dimmick2-Oct-03 12:18
Mike Dimmick2-Oct-03 12:18 
GeneralRe: error deleting record in datagrid Pin
Giovanni Bejarasco2-Oct-03 20:07
Giovanni Bejarasco2-Oct-03 20:07 
GeneralRe: error deleting record in datagrid Pin
Mike Dimmick2-Oct-03 22:30
Mike Dimmick2-Oct-03 22:30 
GeneralRe: error deleting record in datagrid Pin
Giovanni Bejarasco3-Oct-03 1:41
Giovanni Bejarasco3-Oct-03 1:41 
GeneralRe: error deleting record in datagrid Pin
Ian Darling3-Oct-03 22:16
Ian Darling3-Oct-03 22:16 
GeneralDatabases concurrecny issues Pin
Jahangir Jamshed1-Oct-03 19:26
sussJahangir Jamshed1-Oct-03 19:26 
GeneralRe: Databases concurrecny issues Pin
Andy Harman1-Oct-03 22:51
Andy Harman1-Oct-03 22:51 
GeneralRe: Databases concurrecny issues Pin
Mike Dimmick2-Oct-03 3:37
Mike Dimmick2-Oct-03 3:37 
GeneralRe: Databases concurrecny issues Pin
SimonS2-Oct-03 22:46
SimonS2-Oct-03 22:46 
GeneralDataRowState Problems Pin
Wjousts1-Oct-03 11:33
Wjousts1-Oct-03 11:33 
GeneralRe: DataRowState Problems Pin
Giovanni Bejarasco3-Oct-03 1:46
Giovanni Bejarasco3-Oct-03 1:46 
QuestionIndexing Problem??? Pin
Jason Weibel1-Oct-03 8:32
Jason Weibel1-Oct-03 8:32 
AnswerRe: Indexing Problem??? Pin
andyharman1-Oct-03 12:01
professionalandyharman1-Oct-03 12:01 
GeneralRe: Indexing Problem??? Pin
Jason Weibel2-Oct-03 12:09
Jason Weibel2-Oct-03 12:09 
GeneralRe: Indexing Problem??? Pin
Mike Dimmick2-Oct-03 12:49
Mike Dimmick2-Oct-03 12:49 
GeneralRe: Indexing Problem??? Pin
Jason Weibel3-Oct-03 6:08
Jason Weibel3-Oct-03 6:08 
GeneralRe: Indexing Problem??? Pin
Mike Dimmick3-Oct-03 6:27
Mike Dimmick3-Oct-03 6:27 

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.