|
Hi all i am using mysql remote database i am able to connect and retrieve the records from the remote database. But i am unable to update the records.
Please healp.
see my code;
CRecordset cRecord(&db);
CString csQuery;
csQuery.Format(L"select * from %s where product_name = %s", m_TableName,m_ProductName);
cRecord.Open(CRecordset::snapshot, csQuery, CRecordset::none);
if(cRecord.IsOpen())
{
while(!cRecord.IsEOF())
{
cRecord.Edit(); ;
//here i have to update the price column please help me
cRecord.Update();
cRecord.MoveNext();
}//while(!cRecord.IsEOF())
cRecord.Close();
db.Close();
Thanks in advance
|
|
|
|
|
jiya-123 wrote: But i am unable to update the records.
Why not?
jiya-123 wrote: cRecord.Edit();
Did you first call the CanUpdate() method to see if the recordset can be updated?
Also, are you attempting to catch any exceptions (e.g., CDBException )?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Hi,
My intention is to find the best possible method for my requirement. Please share your ideas.
Requirement:
I need to create a dialog bar (I think so) in which I have to place controls (including some custom controls) dynamically. The controls can be placed in one row or more according to a dynamic setting. If there is not enough space to hold all the controls, a drop down button should be there at the right side of the dialog bar. When that button is pressed, the remaining controls should be listed as a popup. The dialog bar need to be dock-able too.
My plan:
Searching for direct support in MFC/Win32. If there is no such support, I am planning to create a custom dialog bar (or derive from CDialogBar) and implement the rest.
Thank you.
- ns ami -
|
|
|
|
|
Sounds like the ordinary toolbar control would help you there. You can replace buttons with custom controls, and add chevron style for the items that doesn't fit. There are plenty of articles here on CP for that.
|
|
|
|
|
Thank you for the reply. Now, I think it is better if we dynamically manage dialog bar controls than going for chevron feature. Also chevron is from rebar control, which does not support docking.
- ns ami -
|
|
|
|
|
Hi!
When I run my project, the application crashes and exception pointer goes to a file called crtexe.c. This is my Call Stack.
65720000()
druidsTech.dll!1009f009()
[Frames below may be incorrect and/or missing, no symbols loaded for druidsTech.dll]
druidsTech.dll!1009f9f1()
> TreasureHunter.exe!mainCRTStartup() Line 403 C
kernel32.dll!761fd0e9()
ntdll.dll!76df19bb()
ntdll.dll!76df198e()
Any of the file names in the call stack is not defined by me. How to solve this crash?
|
|
|
|
|
Use your debugger to locate the problem in your code. Put breakpoints just before the crash occurs and checks if all the variables are correctly set.
|
|
|
|
|
T.RATHA KRISHNAN wrote: Any of the file names in the call stack is not defined by me.
You have one out of three (?) possible problems.
1. You have called an API with illegal parameters.
2. You have corrupted memory which can affect any part of your program.
3. The third party code is causing the problem.
For 1 and 2, use the debugger. For number 3, check if there is a software fix/update.
|
|
|
|
|
For starters it would be nice if you had more symbolic information (to avoid getting frames in the callstack like this: druidsTech.dll!1009f009 ). Have you got symbols for these files?
Steve
|
|
|
|
|
druidsTech.dll!1009f009()
[Frames below may be incorrect and/or missing, no symbols loaded for druidsTech.dll]
druidsTech.dll!1009f9f1()
It shows that No Symbols [PDB files] Loaded for the dll DruidsTech.dll. If you have all the required PDB files you are call stack is informative.
TreasureHunter.exe!mainCRTStartup()
TreasureHunter is the Binary Unit, mainCRTStartup is call. So, you do have pdb information for TreasureHunter.exe.
The answer is get the PDB files for the Binaries to get more information on call stack/
|
|
|
|
|
Hi, ive searched this forum and google and found many tutorials and dll injector sources but i want to modifie injector to reinject everytime when a specified process reloads itself and changes hes process id.
I tryed for checking the process id like this
if(Pid==Pid)
{
hModule = OpenProcess( PROCESS_ALL_ACCESS, true, Pid );
InjectDll(hModule, DLL_Name);
return 0;
}
But it alwyas crashes the injector ....
|
|
|
|
|
Put some error checking and see if OpenProcess is succeeding.
If not, call GetLastError to get more information on the error.
|
|
|
|
|
well everything works fine i mean the dll injector works fine if i inject the dll only once but if i use if statement to check if pid == pid it will crash injector ... mybe im checking wrongly if the process is running ...
|
|
|
|
|
|
nethravathikg wrote: pan,tilt,zoom controller is what i have got as my final yearproject.. but i am not understanding what i have to do
It looks like something related to a video camera adjustments, but your explaination is very poor. If you don't have any idea about what you are talking about, the right person to ask more details is your teacher!
nethravathikg wrote: i need a hep from any body plz reply to this or any body who have done project on this can give me some details regarding this project to my
email id
Nobody will send you any e-mail and when people post answers here you'll get an automatically generated e-mail that informs you. Posting your e-mail on a public forum is useful only as long as you like to get spammed!
|
|
|
|
|
Hi all,
i m using a property sheet,and use 3 property pages here.
i want at certain condition like BOOL test=FALSE; page 3 will me displayed and when test=TRUE; page 3 will not be display.
please tell me how can i do this.
thanks in advance.
|
|
|
|
|
It's not pretty, but see here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
its disable the page on OnInit of Propertysheet,
i want to enable/disable the page 3 with corresponding flag value of page 1.
now what can i do for this.
|
|
|
|
|
Le@rner wrote: now what can i do for this.
You can call EnablePage() from someplace else.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
How to create Interface in c++? sample code pls?
|
|
|
|
|
There's no real interfaces in C++. However, a class with only pure virtual methods and no variable members is generally considered as an interface.
|
|
|
|
|
|
Is there a common way to handle such situation?
SomeObject* objects;
omp parallel for
for (i = 0; i < N; i++) {
int res = RunFunction(objects[i]);
if (res)
return res;
}
Once RunFunction failed stop processing and notify application
Чесноков
|
|
|
|
|
I'm no expert on openMP stuff...
can't you just break ? or simply change the loop value so that next iteration will not continue ?
int res;
SomeObject* objects;
omp parallel for
for (i = 0; i < N; i++) {
res = RunFunction(objects[i]);
if (res)
i = N;
}
return res;
Max.
Watched code never compiles.
|
|
|
|
|
break and return are no allowed.
I'm looking for the common practices and patterns in that scenario to not to envent something uncommon.
Чесноков
|
|
|
|