hellow need your help there is my code i try to get the text from combobox & put it in request but when i wont to ut the result of the request in other texbox i figure out that the value is empty :

HSTMT hStmt;
			 char* nbnk;
			 int ret1;
			 char* chval1;
			String^ szSqlint;
			 String^ nbk;
			 nbk=INOMBAMK->Text;//conbobox
			szSqlint=" select CODE_BANK from BANK where NOM_BANK='"+nbk+"'";
			nbnk = static_cast<char *>(System::Runtime::InteropServices::Marshal::StringToHGlobalAnsi(szSqlint).ToPointer());
			rc = SQLAllocStmt(hDbc,&hStmt);
			rc = SQLPrepare(hStmt,(unsigned char*)nbnk, SQL_NTS);//1
			rc = SQLBindCol(hStmt, 1, SQL_C_CHAR, chval1, 50, (SQLINTEGER*)& ret1);
			rc = SQLExecute(hStmt); 
while(1) 
	{
	rc = SQLFetch(hStmt);
	if(rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO)break;
	String ^ str =gcnew String(chval1);
	TIDBMK->Text=str;//textbox

}

You would get more help if you wrote a proper title when creating a thread.

thnks but t solved

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.