|
how to open a query with just 3 columns? .my database contains 40 i think more... and when i try to update i have this error: SQL: Statement too long, because this is my statement:
SELECT `cont`,`den`,`tip`,`fel`,`listare`,`carte`,`formular`,`rand`,`inchid`,`sid0`,`sid1`,`sid2`,`sid3`,`sid4`,`sid5`,`sid6`,`sid7`,`sid8`,`sid9`,`sid10`,`sid11`,`sid12`,`sid13`,`sic0`,`sic1`,`sic2`,`sic3`,`sic4`,`sic5`,`sic6`,`sic7`,`sic8`,`sic9`,`sic10`,`sic11`,`sic12`,`sic13`,`rld1`,`rld2`,`rld3`,`rld4`,`rld5`,`rld6`,`rld7`,`rld8`,`rld9`,`rld10`,`rld11`,`rld12`,`rlc1`,`rlc2`,`rlc3`,`rlc4`,`rlc5`,`rlc6`,`rlc7`,`rlc8`,`rlc9`,`rlc10`,`rlc11`,`rlc12`,`rcd0`,`rcd1`,`rcd2`,`rcd3`,`rcd4`,`rcd5`,`rcd6`,`rcd7`,`rcd8`,`rcd9`,`rcd10`,`rcd11`,`rcd12`,`rcc0`,`rcc1`,`rcc2`,`rcc3`,`rcc4`,`rcc5`,`rcc6`,`rcc7`,`rcc8`,`rcc9`,`rcc10`,`rcc11`,`rcc12`,`obs`,`codfiscal`,`fact`,`data_fact`,`data_scad`,`mag`,`rata`,`marca`,`verificat`,`i0`,`i1`,`i2`,`i3`,`i4`,`i5`,`i6`,`i7`,`i8`,`i9`,`i10`,`i11`,`i12`,`sold_vechi`,`sold_nou`,`l`,`curs_ini`,`data_curs`,`moneda`,`cont_conv`,`val_conv`,`curs_ref`,`r1`,`r2`,`r3`,`r4`,`r5`,`r6`,`r7`,`r8`,`r9`,`r10`,`r11`,`r12`,`nr_rate_r`,`tva`,`inceput`,`terminat`,`curs_fin`,`s_v_ini`,`bi`,`v_tva` FROM `2006tert` WHERE fact=1978
how to write an sql statement when i try to open
CString sQLW = ("SELECT................ what?
CDatabase_ALS pRo;
pRo.Open(CDatabase_ALS::snapshot,sQLW);
this statement it came from this CString sX = pRo.GetSQL();
m_lop.SetWindowText(sX);
and this i have seen my select statement because i dont write it!
all i want is to edit a field from cont !
???????????????????????????????????????????????????????
Bravoone
|
|
|
|
|
Use a stored procedure perhaps ?
|
|
|
|
|
if you want to read some cols you can simply enter names of cols Select col1,col2,col3 from table1
|
|
|
|
|
sQL =("SELECT cont,codfiscal,fact FROM 2006tert");
using this i have this rezult :
Invalid descriptor index!!!!!!!!!!!!!!!!!!!
what can i do?
-- modified at 7:53 Thursday 4th January, 2007
Bravoone
|
|
|
|
|
|
Is this link helpful
http://www.codeguru.com/forum/showthread.php?p=1459845#post1459845
|
|
|
|
|
What is CDatabase_ALS derived from? CRecordset?
If so then check the class. Is there a DoFieldExchange override? If so, is it exchanging more
fields than the three you want? If so, then that's a problem
|
|
|
|
|
I want to get text data from another program by this function.
::SendMessage(hwnd,WM_GETTEXT,0,(LPARAM)pchData)
So,I need hwnd of destination Edit Ctrl, but I don't know how to get it.
Please help me to solve this problem
|
|
|
|
|
If you have the handle of the parent window, then you can use EnumChildWindows to search for the EDIT one.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
If the target application is always the same, you may use Spy++ to identify your editbox.
Otherwise, ChildEnumWindow is a possibility, but then you will need another way to check if the returned handles are really these you awaited (maybe IsKindOf ?)
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Do not feed the troll ! - Common proverb
|
|
|
|
|
I think your answer is EnumDesktopWindows
|
|
|
|
|
If what you need is to retrieve the content of an edit control from another application, you can't. GetWindowText can retrieve only a caption (if any) from a window owned by another process.
Since an edit control does not have a caption, you'll retrieve a null string. Otherwise, one could easily read a password from a password edit control.
It could be possible to use an injection in the process, using VirtualAlloc and VirtualProtect, inject code in the target executable, allocate a buffer in the other executable' space, call there the WM_GETTEXT (in that exe) and then pass back to your exe the content of the buffer (IPC, MapViewOfFile, your choice). This is the way to retrieve, for example, the content of a listview (a lot of times I saw people asking how to read the content of OE list). I don't know the technique in detail, I just saw it once - but I think you have already the information to start looking for. Good luck.
|
|
|
|
|
How would I get the full path of where an application is saved and started from in a C++ application??
|
|
|
|
|
User GetCurrentDirectory()
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
GetCurrentDirectory can be different many times, like depending on the parent process currentdirectory, or "Startin Folder" of a short cut or how setcurrentdirectory() etc
|
|
|
|
|
And why do you say this to me?
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
brahmma wrote: And why do you say this to me?
You suggested to use GetCurrentDirectory() for retrieving the application path.
|
|
|
|
|
The question itself is not very clear. See here[^] And so did I suggest GetCurrentDirectory(). If you were *of any help* to the person who asked the question, go tell him what you know.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
brahmma wrote: The question itself is not very clear. See here[^] And so did I suggest GetCurrentDirectory().
Whichever way you interpret the question, your answer would not work. Do not expect to getaway after posting wrong answers in public forums.
brahmma wrote: If you were *of any help* to the person who asked the question, go tell him what you know.
The right answer was already posted and voted see here [^] so i did not want to repeat the same answer.
|
|
|
|
|
suhredayan® wrote: Whichever way you interpret the question, your answer would not work.
Huh? GetCurrentDirectory() does return the current directory. I have not suggested anything wrong. GetCurrentDirectory or GetModuleFileName, or even something else; depending on the user's need he has to choose what he wants.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
Some times what you need is
GetModuleFileName .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Wheres this program when you run your project or when a program is running?
|
|
|
|
|
I don't understand what means "path where application is saved".
If what you need is the folder from where application was started, use GetModuleFileName(NULL) or GetCommandLine to retrieve the full exe path and then PathRemoveFileSpec to get only the path.
GetCurrentDirectory can be altered during program execution (not to mention that the application itself can be configured to run in other directory than the directory where the application resides).
|
|
|
|
|
To get complete path of the current application....
TCHAR szPath[MAX_PATH];
GetModuleFileName(AfxGetApp()->m_hInstance, szPath, MAX_PATH);
Use CreateProcess() to start an application.
|
|
|
|
|
i have fetch two values duration and bitrate from the .wmv file header.
for duration i am using the GetTimeFormat.is it ok?
that values get into following datatypes
1)duration in QWORD. i have convert it into WCHAR.
2)bitrate in DWORD. I have convert it into WCHAR.
suppose the DURATION = 389660000 it will display in hh:mm:ss format like 00:00:10
bitrate = 103080 it will display in Kbps or Mbps.
amit
|
|
|
|
|