|
What in the world are you asking here? Are you wanting to know how to populate a list control from a database? If so, there's an example of that here. If it's something else, please explain in more detail.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
It is not clear if your items -- loaded from FoxPro database -- are successfully inserted into your list control. If they appear in the list control, but FindItem apparently cannot find them, maybe they contain some additional spaces returned from FoxPro?
Maybe you should try something like this:
m_list.InsertItem(..., CString(text_from_database).Trim());
m_list.SetItemText(..., 1, CString(text_from_database).Trim());
I hope executing your program in step-by-step manner and providing reasonable details can help to solve the problem quickly.
|
|
|
|
|
I have to make an application which would access MS accesss datatbase .
I have some experience on VC++ 6 (MFC)but never worked in this field
Please if anyone could suggest me some articles or tutorials or sample codes
I would be grateful to all
|
|
|
|
|
|
SEARCH ON CODEPROJECT ARE MANY ARTICLES FOR DATABASE : CRECORDSET
AND IF YOU DONT FIND ANY WRITE ME ON bravoone@k.ro maybe i can help you ! maybe ...! i'm not so good on database ! i have problems to !!!
read my question ! and maybe you can help me to ...!!!
maybe we can help us! i dont speach english very well ! but i understend everything !
>>>>>>>>>>>>bravoone<<<<<<<<<<<
Bravoone
|
|
|
|
|
anjita wrote: I have to make an application which would access MS accesss datatbase .
See if this helps.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
i dont now what is wrong but nothing hapening when i push the buton !
(the data from list control are from a database in visualfox 6.0)
maybe help this ! i dont now !
void CNcontabile::OnTest2()
{
CString sRelatia ;
m_relatia.GetWindowText(sRelatia);
LVFINDINFO stInfo = {0};
stInfo.flags = LVFI_STRING;
stInfo.psz = sRelatia;
int nItem = m_list.FindItem( &stInfo );
if( nItem != -1 )
{
// the item is in the list control
CString csSecondColumnText = m_list.GetItemText( nItem, 1 );
// set the text to the second edit box
m_credit.SetWindowText( csSecondColumnText);
}
}
i dont use anything else but this in my code and in OnInitDialog :
m_list.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVFI_STRING | LVS_EX_FLATSB);
m_list.InsertColumn(0,"Cont",LVCFMT_LEFT,90);
m_list.InsertColumn(1,"Denumire",LVCFMT_LEFT,360);
Bravoone
|
|
|
|
|
Maybe instead of
m_list.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVFI_STRING | LVS_EX_FLATSB);
you should have
m_list.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVS_EX_FLATSB);
Can you put a break point inside the OnTest2 function and execute it in step-by-step manner? I hope this will help you to solve the problem.
|
|
|
|
|
IS STILL NOT WORKING HE FIND ONLY ITEMS INSERTED IN ONINITDIALOG !!!
YOU HAVE ANOTHER SOLUTION !? MAYBE BETHER !!!! THANKS A LOT !!!!!!
bravoone !!!! i wait your answer !!!!!!
and thanks again!!!!!!!!!!!!!
Bravoone
|
|
|
|
|
Flaviu_2006 wrote: stInfo.flags = LVFI_STRING;
What if you used LVFI_PARTIAL instead?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
LVFI_PARTIAL solv the problem THANKS GUYS !!!!!!!!!!!!!!!!!!!!!!!!!
ITS COOOOLLLLLLLLL !!!!!!!!!!!!
ITS WORKING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
TO EVRYONE WHO HAVE PATIANCE WITH ME => THANKS AND IN THE FUTURE MAYBE I CAN HELP YOU TO !!!!!!!!!!!!!!!!!!!!!!!!
THANKS OF LOT TO EVRYONE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
SPECIALY TO ---> FRANK WHO HAVE THE IDEEA !!!!!!!!!!!!!!!!!THAKS!!!!
bravoone out !
p.s. - see you soon !!!!!!!!!! on www.codeproject.com
Bravoone
|
|
|
|
|
yes i cannot find in a list an item which was not inserted!
...but is loaded in list control from a database !!!!! visualfox pro 6.0
its a usefull tool if is someone who can do it !
>>>>>>>>>bravoone<<<<<<<<<<<<<
pls help urgent !!!!!!!!!
thanks a lot !!!!!!!!!!!!!
Bravoone
|
|
|
|
|
Hi All,
I have automated MSWord in VC++ and open an *.doc file and save it as a text file with the help of CodeProject. But I am getting Run time errors while I am try to close my application and documents .
*The error is
"Application has requested Run time to Terminate it in an unusual way"
My Code starts here
BOOL CLastApp::InitInstance()
{
if(!AfxOleInit()) // Your addition starts here
{
AfxMessageBox("Could not initialize COM dll");
return FALSE;
}
else
{
AfxMessageBox("Inint");
}
_Application app; // app is the Excel _Application object
if(!app.CreateDispatch("Word.Application"))
{
AfxMessageBox("Couldn't start Word");
}
else
{
//Make Word Visible and display a message
app.SetVisible(TRUE);
AfxMessageBox ("Word is Running!");
}
COleVariant
covTrue((short)TRUE),covFalse((short)FALSE),covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR),covFormat( short(7));
Documents docs = app.GetDocuments();
_Document doc = docs.Open(
COleVariant("D:\\ss.doc"),
covTrue, // Confirm Conversion.
covTrue, // ReadOnly.
covFalse, // AddToRecentFiles.
covOptional, // PasswordDocument.
covOptional, // PasswordTemplate.
covFalse, // Revert.
covOptional, // WritePasswordDocument.
covOptional, // WritePasswordTemplate.
covTrue,
covTrue,
covOptional,
covOptional,
covOptional,
covOptional);
doc.SaveAs(COleVariant("D:\\george\\win.txt"),
covFormat,covOptional,covOptional,
covOptional,covOptional,covFalse,covOptional,
covTrue,covFalse,covOptional, covOptional,covTrue,covOptional,covOptional,covOptional);
/**********IT IS WORKING UPTO HERE PROPERLY ************************/
//**********PROBLEM STARTS FROM HERE****************************//
doc.Close(covOptional,covOptional,covOptional);
docs.Close(covOptional,covOptional,covOptional); /*Error is coming from here if we comment it no error will come */
app.Quit();
}
//Programme Ends here
While am trying to close doc or docs its getting run time error. How I can properly Execute these statements.
Please help me
Thanks in Advance
George K Jolly
-- modified at 10:39 Thursday 3rd August, 2006
|
|
|
|
|
georgekjolly wrote: While am trying to close doc or docs its getting run time error.
Maybe one or the other does not need closed. What runtime error are you referring to?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi all,
Hope this is the right place to post this question, but does anyone know how to start a application (or bat file) after a istaller is finished with Visual Studio 2005 Setup?
Thanx
Regards
Programm3r
|
|
|
|
|
Which application you want to start?
VS 2005 working fine after normal installation.
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
My Blog | Understanding State Pattern
|
|
|
|
|
Thanx for the response....
After the installation I want a bacth file to start, the bacth file will perform a couple of action and thats it, problem is i don't know how to start a program after the installation is completed?
Regards
Programm3r
|
|
|
|
|
It's confusing. can't you start the batch file manually after completing the setup?
What do you mean by application? you want to start the application as the part of setup? if it so, I dont have any solution
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
My Blog | Understanding State Pattern
|
|
|
|
|
O.K, It's like this:
A setup program runs, to copy files. Just like any other install program. ( with the exception that I created the setup program). Then after the install (after the install is complete || the the user has pressed finish) the setup program must start another program ( this program can be a bacth file || it can be a executable file .exe)
I don't know what setting to configure in Visual Studio 2005 Setup Deployeement to do this.
Regards
Programm3r
|
|
|
|
|
sorry i dont know. please check the read me file of VS installtion
|
|
|
|
|
Thanx anyway
Regards
Programm3r
|
|
|
|
|
Try using the PostBuildEvent property of your setup project.
Neil Van Eps
"Staging servers are for compulsive bed-wetting types." - Chris Maunder
|
|
|
|
|
hi
When I tried to execute a sample from msdn I got an error as
cannot open file "mfc42u.lib"
How to resolve this.I am using vc6.0
Thanks in advance
|
|
|
|
|
check if is not opened ! if is open mfc42u.lib you got that answer !
Bravoone
|
|
|
|