Ajouter un commentaire

K-lo

DBBINDING acDBBinding[1];

	struct s_param{
	
		std::wstring col1;
	}
		
	s_param p1;
	p1.col1.assign(L"test1");

        //init DBBINDING 
	acDBBinding[0].obLength = 0;
	acDBBinding[0].obStatus = 0;
	acDBBinding[0].pObject = NULL;
	acDBBinding[0].pTypeInfo = NULL;
	acDBBinding[0].pBindExt = NULL;
	acDBBinding[0].dwPart = DBPART_VALUE;
	acDBBinding[0].dwMemOwner = DBMEMOWNER_CLIENTOWNED;
	acDBBinding[0].dwFlags = 0;
	acDBBinding[0].bScale = 0;

	
	acDBBinding[0].iOrdinal = 1;
	acDBBinding[0].obValue = offsetof(p1, col1);
	acDBBinding[0].eParamIO = DBPARAMIO_INPUT;
	acDBBinding[0].cbMaxLen= 50;
	acDBBinding[0].wType = DBTYPE_WSTR;
	acDBBinding[0].bPrecision = 0;

	params.pData = &p1;
	params.cParamSets = 1;
	params.hAccessor = hAccessor;

	if( FAILED( hr = pICommandText->Execute( NULL, 
		IID_IRowset, 
		&params, 
		&cNumRows, 
		(IUnknown **)&pIRowset ) ) 
		){
			cerr<<"Echec lors de l'execution de la procedure "<<endl;
			return 1;
	}

	cout <<"Execution de la procedure stockee, terminee."<<endl;


	

Je vous ai bien évidemment épargné les nombreuses déclarations qui ne sont pas utiles ici.

Filtered HTML

Plain text

CAPTCHA
Cette question permet de vérifier que vous n'êtes pas un robot spammeur :-)
 RRRR   U   U   CCC  X   X  PPPP  
R R U U C X X P P
RRRR U U C X PPPP
R R U U C X X P
R RR UUU CCC X X P