hello
i programing the code && design the interfaces
then , connect the programing with db "store the results in db"
then connect the db with interface and appeare the results on edit boxes in the interface
now , we want excute the programing code when click specific button .so, we use this function :
ShellExecute(this->m_hWnd,"open","proto1.exe","","", SW_SHOW );
when we run the interface and click the button excute the programing code"proto1.exe"
but the result false . the results diffrent about the results that appere when excute the file separetly on console also the data base some time doesn't update .so, the results itrated
also , the same copy from proto1 that deal with db and interface when take it in other place provide the same false results . althogh , ather copy of ptoto1 that dosn't deal with db and interface work very good
note , in proto1 code read from 2 files and these files important to programing the code and the results depod on them
in interface , the user do prowse and select 2 files . these file appear in edit boxes then stored in 2 other static files"in each chose for user change the content of files" that the proto1 read from them

i hope knowing why the results appearing false and db does not update

>>when we run the interface and click the button excute the programing code"proto1.exe"
but the result false

Do you mean ShellExecute() return 0? My guess is that you need to add the full path to the proto1.exe program. Example: ShellExecute(this->m_hWnd,"open","c:\\mydir\\proto1.exe","","", SW_SHOW );

yes, i do full path & put it in the same folder
both the same problem

I'm sorry but I don't know how to help you. What compiler are you using? Are you using MFC or some other GUI ? What database are you using? How is proto1.exe accessing the database (ODBC or something else)? After running proto1.exe have you check the results in the db from command prompt or some other methodl outside your program?

Can't help you much without seeing code so that we can try the same thing to duplicate your problem.

yes, i do full path & put it in the same folder
both the same problem

Could it be that the current working directory (the lpDirectory argument) is not what it should be at the time you call ShellExecute(), i.e. proto1 does not find the files?
Note that you should specify NULL for lpDirectory in order to use the calling program's working directory (now you are using a zero-length string).

http://msdn.microsoft.com/en-us/library/bb762153(VS.85).aspx

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.