MSDN 中一些简单的示例。Example// Embed a CDatabase object // in your document class CDatabase m_dbCust;// Connect the object to a // data source (no password) // the ODBC connection dialog box // will always remain hidden m_dbCust.Open( _T( "MYDATASOURCE" ), FALSE, FALSE, _T( "ODBC;UID=JOES" ),// ...Or, query the user for all // connection information m_dbCust.Open( NULL ); CString strCmd = "UPDATE Taxes SET Federal = 36%";TRY { m_dbCust.ExecuteSQL( strCmd ); }CATCH(CDBException, e) { // The error code is in e->m_nRetCode }END_CATCH
http://www.vckbase.com/document/viewdoc/?id=1838
// in your document class
CDatabase m_dbCust;// Connect the object to a
// data source (no password)
// the ODBC connection dialog box
// will always remain hidden
m_dbCust.Open( _T( "MYDATASOURCE" ), FALSE,
FALSE, _T( "ODBC;UID=JOES" ),// ...Or, query the user for all
// connection information
m_dbCust.Open( NULL );
CString strCmd = "UPDATE Taxes SET Federal = 36%";TRY
{
m_dbCust.ExecuteSQL( strCmd );
}CATCH(CDBException, e)
{
// The error code is in e->m_nRetCode
}END_CATCH
想问一下,FOX数据库的查询语句和SQL SERVER的一样吗
怎么通过本机连接局域网内另一台电脑的visual FOXPRO 再就是ODBC里怎么边
如果应是要使用网络来操作那必需写个服务程序,客户端通过服务程序来实现你想要的功能。