|
|
|
Такая проблемка неработает Update
|
|||
|---|---|---|---|
|
#18+
Такая проблемка неработает Update.Вот пример кода ,помогите плизззззз,BD na Accsess Зарание спасибо!!! private void up_btn_Click(object sender, System.EventArgs e) { try { this.oleDbDataAdapter1.UpdateCommand.CommandText = "UPDATE BookDb SET "+ "author ='"+ this.author_textBox.Text +"', EditionNumber ='"+this.ed_textBox.Text + "', ISBN ="+this.isbn_textBox.Text+", Title ='"+ this.title_textBox.Text+"'" + " WHERE ISBN ="+ this.isbn_textBox.Text; //open the bridge between the application and the datasource this.oleDbConnection1.Open(); this.oleDbDataAdapter1.UpdateCommand.Connection = oleDbConnection1; //execute the qurey this.oleDbDataAdapter1.UpdateCommand.ExecuteNonQuery(); //close the connection this.oleDbConnection1.Close(); MessageBox.Show("Record updated Successfully"); //inform the user //clear the form this.title_textBox.Text = ""; this.isbn_textBox.Text = ""; this.author_textBox.Text = ""; this.ed_textBox.Text = ""; //show the qurey this.qurey_label.Text = ""; this.qurey_label.Text = oleDbDataAdapter1.UpdateCommand.CommandText.ToString(); } catch(System.Data.OleDb.OleDbException exp) { //close the connection this.oleDbConnection1.Close(); MessageBox.Show(exp.ToString()); } } ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.01.2007, 20:13 |
|
||
|
Такая проблемка неработает Update
|
|||
|---|---|---|---|
|
#18+
SharkiТакая проблемка неработает Update.Вот пример кода ,помогите плизззззз,BD na Accsess Зарание спасибо!!! private void up_btn_Click(object sender, System.EventArgs e) { try { this.oleDbDataAdapter1.UpdateCommand.CommandText = "UPDATE BookDb SET "+ "author ='"+ this.author_textBox.Text +"', EditionNumber ='"+this.ed_textBox.Text + "', ISBN ="+this.isbn_textBox.Text+", Title ='"+ this.title_textBox.Text+"'" + " WHERE ISBN ="+ this.isbn_textBox.Text; //open the bridge between the application and the datasource this.oleDbConnection1.Open(); this.oleDbDataAdapter1.UpdateCommand.Connection = oleDbConnection1; //execute the qurey this.oleDbDataAdapter1.UpdateCommand.ExecuteNonQuery(); //close the connection this.oleDbConnection1.Close(); MessageBox.Show("Record updated Successfully"); //inform the user //clear the form this.title_textBox.Text = ""; this.isbn_textBox.Text = ""; this.author_textBox.Text = ""; this.ed_textBox.Text = ""; //show the qurey this.qurey_label.Text = ""; this.qurey_label.Text = oleDbDataAdapter1.UpdateCommand.CommandText.ToString(); } catch(System.Data.OleDb.OleDbException exp) { //close the connection this.oleDbConnection1.Close(); MessageBox.Show(exp.ToString()); } } просто не выполняет сохранение или выбрасывет хоть какое-то исключение? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 31.01.2007, 16:58 |
|
||
|
Такая проблемка неработает Update
|
|||
|---|---|---|---|
|
#18+
Я извеняюсь что пропал,и вобще я извеняюсь что я такая свинья,но вот програмка которую я написал может у кого нибудь будет желание и время посмотреть и сказать где мои ошибки.Зарание спасибо,буду очень благодарен!!! ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 01.02.2007, 19:31 |
|
||
|
|

start [/forum/topic.php?fid=17&msg=34294236&tid=1352966]: |
0ms |
get settings: |
10ms |
get forum list: |
18ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
31ms |
get topic data: |
9ms |
get forum data: |
2ms |
get page messages: |
48ms |
get tp. blocked users: |
1ms |
| others: | 198ms |
| total: | 323ms |

| 0 / 0 |
