看板 Database 關於我們 聯絡資訊
環境: SQL SERVER 2005 Visual C++ OLE DB 問題: 平常使用 "SELECT * FROM annotation" 時可以回傳資料 但是使用 "SELECT id FROM annotation" 就找不到資料了@@ (確定有id欄位) 請問有人遇過這種事情嗎? 部分程式碼 ---------- RETURNHR(hr = the_object.Create(session, _T("SELECT id FROM annotation") )) RETURNHR(hr = the_object.Prepare(3)) RETURNHR(hr = the_object.Open(&propset)) //Get data from the rowset. while(the_object.MoveNext() == S_OK){ cout << the_object.id << endl; } -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.116.247.157
marcoyan:如果是mysql用 `id`,mssql的話用 [id],試試看 09/24 16:12