在用ado 连接数据库的时候 try { if(m_nConnectionTimeout != 0) m_pConnection->PutConnectionTimeout(m_nConnectionTimeout); hr = m_pConnection->Open(_bstr_t(m_strConnection), _bstr_t(lpstrUserID), _bstr_t(lpstrPassword), NULL); if (hr == S_OK) { m_bNeedReconnect = FALSE; return TRUE; } else { m_bNeedReconnect = TRUE; return FALSE; } } catch(_com_error &e) { dump_c...
by gengpengfeiX - C/C++ - 2007-11-05 16:15:19 阅读(1143) 回复(0)
我的informix ids 7.3 在unix和linux平台上,编码为iso8859 informix client 为cnt281ux.zip。 我在vc中用ado能够连接informix 数据库,但是中文读出来为西文编码, 用setnet32设置无效,可能没有设置正确. 问: 如何才能正确显示和操作中文
以前用delphi的ado写了几个程序,连oracle8i, 今天重装oracle,现在delphi5的ado竟然连不上oracle, 提示: 初始化提供者中发生错误,测试连接失败。发生了一个oracle错误, 但无法从oracle中恢复错误信息! 这是怎么回事?
下面一段代码是用MFC ODBC写的 如果用ado怎么写 try { recordset.Open(AFX_DB_USE_DEFAULT_TYPE,"select id,photoid,name,department,canbeadd from users"); } catch(CDBException e) { AfxMessageBox(e.m_strError); return; } CDBVariant id,photoid,beadd; int index=0; while(!recordset.IsEOF()) { recordset.GetFieldValue(short(0),id); index=id.m_lVal-UserIdRadix; recordset.GetFieldValue(1...
下面一段代码是用MFC ODBC写的 如果用ado怎么写 try { recordset.Open(AFX_DB_USE_DEFAULT_TYPE,"select id,photoid,name,department,canbeadd from users"); } catch(CDBException e) { AfxMessageBox(e.m_strError); return; } CDBVariant id,photoid,beadd; int index=0; while(!recordset.IsEOF()) { recordset.GetFieldValue(short(0),id); index=id.m_lVal-UserIdRadix; recordset.GetFieldValue(1...