|
yar this will not work as if it delete sucessfully it will not display message and if i enter wrong id it willnot display message
Please mail me
|
|
|
|
|
Maybe mysql_num_rows can be used only with SQL statements which return result set? Check the documentation. If no other solutions, I think you can first execute a SELECT statement in order to see if there is a row, then use mysql_num_rows to check the result, and after this use DELETE.
|
|
|
|
|
|
Maybe you forgot to execute the SELECT statement with mysql_query or mysql_real_query ?
|
|
|
|
|
sir u r the man who can solve any problem its amazing
thanks a lot
sir i want to fetch date from mysql table with other values that is when i press fetch button in mfc dialogbox it will display values from mysql table into dialog box's edit boxes . all values are fetched but date does not
as the mysql date format is yyyy-mm-dd and the datetime picker in mfc has the format dd-mm-yyyy
plz tel me how to fetch it
Please mail me
|
|
|
|
|
Maybe like this:
const char * const s = "2006-06-12" ;
int year, month, day;
sscanf(s, "%i-%i-%i", &year, &month, &day);
CTime const t(year, month, day, 0, 0, 0);
m_cMyDateTimePicker.SetTime(&t);
|
|
|
|
|
but sir wat iwill enter in place of date 2006-06-12 otherwise it will give only this date. i dont know but value stored in mysql table
const char * const s = "2006-06-12" ;
Please mail me
|
|
|
|
|
It was just a sample.
In your application you probably get date from database with a SELECT statement, let us say "SELECT id, name, date, count FROM myTable " (this is just a sample). Then you use mysql_query and finally something like res = mysql_store_result(myDB) . Now you can access the date value, which is the third field of the statement:
char * s = row[2];
Put a breakpoint here and see if the date value is valid. Then use the previous sample to display it.
|
|
|
|
|
thanks a lot sir
can i hav ur personel mail id if possible and u dont mind
Please mail me
|
|
|
|
|
First try hard-coding your SQL statement. i.e select * from empinfo where empid = 111 and see if it works. Mostly the bug sits in the way we assemble the string. And if the hard-coding works fine, try to make your sql string and before excuting it, Display it in a message box or in a CEdit so that you could verify that you are passing a well formed query string. Or you can also set check points to see the string.
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
|
|
|
|
|
i want to sense the event of clicking the print option on the file menu in Internet Explorer... can anyone tell me how i can do this.. i need to display something when the user clicks on the print option.
|
|
|
|
|
When ever i try to delete a pointer exception is occuring.
if any reson for this?????
yours faithfully
ajeeshcv
|
|
|
|
|
|
no...i tried to delete it after checking.
if( pPointer )
{
delete pPointer;
pPointer = 0;
}
yours faithfully
ajeeshcv
|
|
|
|
|
|
exception is occuring.
yours faithfully
ajeeshcv
|
|
|
|
|
Ajeesh c v wrote: exception is occuring.
DAMNNNNN !!! WHICHHHH ?????
if you don't provide some descriptions of your error case, how can one help you ??
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
ok...
I think the problem is occuring due to this reason.
am initializing the pointer from thread...adn try to delete it from another thread..
if there is any chance of occuring exception????
Please help me...
yours faithfully
ajeeshcv
|
|
|
|
|
|
I think this causes problems if your project’s configuration does not allow multi-threading. You should open the project’s properties dialog and be sure that the C/C++ --> Code Generation --> Runtime Library option contains a right value related to multi-threading. Then rebuild the application.
|
|
|
|
|
Thank you...
I don't know it will work or not.
Let me check.
yours faithfully
ajeeshcv
|
|
|
|
|
Ajeesh c v wrote: am initializing the pointer from thread...adn try to delete it from another thread
May one thread still be accessing the memory you just deleted?
Maybe using smart-pointers (like those from boost.org)[^]can help you?
Or at least an object which can delete itself via a member function?
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
That's a very clear description of the problem
The solution is: you did something wrong.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Thats a very precious information for me.
Thank you..
yours faithfully
ajeeshcv
|
|
|
|
|
What is the exact error ?
Maybe your pointer points to an invalid address. You probably left it uninitialized and then try to delete it.
Cédric Moonen
Software developer
Charting control
|
|
|
|