[問題] MFC update access database

看板C_and_CPP (C/C++)作者 (始終不渝)時間11年前 (2015/05/04 17:27), 編輯推噓1(104)
留言5則, 3人參與, 最新討論串1/1
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) vc6.0---language:MFC(visual c++) 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) db 問題(Question): a.MFC connection with ODBC or ADO init code b.Database,RecordSet,table關係(as Code) 餵入的資料(Input): xxx.mdb 預期的正確結果(Expected Output): update xxx.mdb one column from UI input in one textbox 錯誤結果(Wrong Output): 程式碼(Code):(請善用置底文網頁, 記得排版) CDatabase db; CString sql; sql="Update RED Set dc=19"; //sql+=this->m_dwCalWt; db.ExecuteSQL(sql); //RED is table name //dc is field name 簡單來講就是update一欄的基本動作 Q:不知上面那錯?xxx.mdb no update 補充說明(Supplement): MFC open project 從empty開始 因為不太熟 project\database or project\application or MFC AppWizard(exe) 去建構MFC database -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 111.248.43.145 ※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1430731654.A.F21.html

05/04 18:21, , 1F
條件
05/04 18:21, 1F

05/05 08:44, , 2F
什麼條件?
05/05 08:44, 2F

05/05 09:04, , 3F
where?
05/05 09:04, 3F

05/05 11:25, , 4F
where version = 0
05/05 11:25, 4F

05/05 11:26, , 5F
這樣子理論應該就會更新了~不過似乎沒更新
05/05 11:26, 5F
文章代碼(AID): #1LHpk6yX (C_and_CPP)
文章代碼(AID): #1LHpk6yX (C_and_CPP)