Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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

share|improve this question
Duplicate. You already asked this: stackoverflow.com/questions/17066549/… – ayuelkenbeck 2 days ago

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.