//
 /**////////////////////////////////////////////////////////////
void main()
  {
HRESULT hr = S_OK;

if(FAILED(::CoInitialize(NULL)))
return;

ExecuteSql();
//Wait here for the user to see the output.
printf("\n\n按任意键继续 ");
getch();
::CoUninitialize();
}


 /**////////////////////////////////////////////////////////////
// //
// ExecuteSql Function //
// //
 /**////////////////////////////////////////////////////////////
VOID ExecuteSql(VOID)
  {

HRESULT hr = S_OK;

// Define ADO object pointers.
// Initialize pointers on define.
// These are in the ADODB:: namespace.
_RecordsetPtr pRs = NULL;
_CommandPtr pCmd = NULL;
_ParameterPtr pPrmParam1 = NULL;
_ParameterPtr pPrmParam3 = NULL;
_ConnectionPtr pConnection = NULL;

_bstr_t strCnn("Provider=OraOLEDB.Oracle;Data Source=Console;User Id=aol;Password=123;");

_bstr_t strMessage, strAuthorID;

int intParam1;
 上一页 [1] [2] [3] [4] [5] 下一页 |