Bonjour,
J'ai repris un ancien code, après migration sur MySQL, maintenant J'ai une exceptionlorsque je fais un .Update(). Qu'est qui peut expliquer ce plantage, qu'il n'y avait pas avant ?Unhandled exception at 0x7c81eb33 in Sign Scheduler.exe: Microsoft C++ exception: CDBException at memory location 0x018ff5a0..
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38 T_Signs f_pSignTable(&m_bdDatabase); //Derived from CRecordset bool Status_Changed = false; if (m_bdDatabase.m_hdbc) { CString f_sSQLCommand; f_sSQLCommand.Format("SELECT * FROM t_signs"); if (!f_pSignTable.Open(CRecordset::snapshot, f_sSQLCommand, CRecordset::none)) { //Can not open pb : Exit return Status_Changed; } if (f_pSignTable.CanAppend() == 0) return Status_Changed; while (!f_pSignTable.IsEOF()) { if (f_pSignTable.m_Name == f_SignName) { Status_Changed = (f_pSignTable.m_Activity != ESignStatus[f_SignStatus]); if (Status_Changed) { //f_pSignTable.MoveFirst(); f_pSignTable.Edit(); f_pSignTable.m_Activity = ESignStatus[f_SignStatus]; f_pSignTable.Update(); } break; } // Skip to the next resultline f_pSignTable.MoveNext(); } f_pSignTable.Close(); }
Partager