Have to connect to DB by odbc named "ABC" already made in server odbc settings. and do the following in code dbT_VOY tT_VOY(dbase2); CString csFilter;
cout<<"the enetered voyage number is "<<voy<<endl;
cout<<"the vessel code is "<<ves<<endl;
csFilter.Format("VESSEL='%s' and VOY_NUMBER='%s'",ves,voy); // Not working
cout<<csFilter<<endl;
tT_VOY.setFilter(csFilter);
tT_VOY.Open(CRecordset::forwardOnly, CRecordset::readOnly | CRecordset::executeDirect);//OPEN TAG
if(!tT_VOY.IsEOF())
{} tT.VOY.Close;
//THis is working fine, only problem is it pops for a username and paswrd for db in sql server login box when it comes to the OPEN tag. After putting the detauils it wrks as expected as used in a pplication. BUt the box is to be prevented . Hw can it take username and paswrd itself. Connection poolin is already iomplemented. HW it can be done for this block separetly as other fxns dealing wid db are wrkin fine widout askin fr db paswrd. Please help