|
How to update just 2 field from my table ?
i whant to edit a field from my database-> table but i dont know how to update just that field!
My database visual fox pro 6.0
Database name : Database_Pers
Table name : city
my string to update in the field city is CString sTemp;
this is :
CDatabase_Pers pPers;
...
pPers.Edit();
pPers.m_city = sTemp;
....This is update ....but if update all i have this error:
SQL:statement too long !
pPers.Update(); <-This generate this error !
Bravoone
|
|
|
|
|
Bravoone_2006 wrote: SQL:statement too long !
You've still not indicated how long the SQL statement is.
Bravoone_2006 wrote: pPers.Update(); <-This generate this error !
Step into this method to see what the actual SQL statement looks like. That will go a long way towards finding the problem.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
if your problem is on sql I suggest aks on sql forum
|
|
|
|
|
Please can anybody give me any cites from where i could learn MFC
gujar
|
|
|
|
|
You're here already! I don't know a website that's better than the CodeProject to learn MFC. Get a life dude.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
|
|
|
Hello,
I have an existing Programm without sources and i want edit the forms icon and text. is there any API Function/Call or something else?
Greetings from germany
|
|
|
|
|
Hi all,
I am trying to set some Background colors to CpropertSheet Tab controls.
I have tried Handling
OnPaint
OnCtlColor
OnEraseackground to acheive it.But none is helping
This is a Samble code which i used in EraseBackground handler
CPropertyPage::OnEraseBkgnd(pDC);
CRect rect;
CTabCtrl *tab = internal_sheet.GetTabControl();
tab->GetItemRect(0,&rect);
pDC->FillSolidRect(&rect, RGB(255, 0, 0));
return true;
This also not working
I am also trying to set the Tap position from the default left side to Right
This ModifyStlye(0,TCS_RIGHT); Positioning the tab in the bottom side.
ans the "TCS_VERTICAL" is not showing other tabs.
Please throw some ideas to acheive this.
-- modified at 4:19 Wednesday 13th December, 2006
|
|
|
|
|
Does this work?
BOOL CMyPropertyPage::OnEraseBkgnd(CDC* pDC)
{
CRect rect;
GetClientRect(&rect);
pDC->FillSolidRect(&rect, RGB(255, 0, 0));
return TRUE;
}
|
|
|
|
|
if you use of WM_PAINT what happens?
|
|
|
|
|
Hey,,,
I have a fer function that wait for input for a while...
at the moment... I code it simple like this...
for(i=0; i<50000000; i++){
//waiting for input
}
As Processes inside the loop are changing, the loop takes longer and shorter amounts of time to complete.. 3sec to 50sec.
what the easiest way to set up a timed loop that loops the same amount of time every time?
Example:
While ( time < 10Seconds ){
//wait for input
}
|
|
|
|
|
Hi!!,
u can put a counter inside the loop that increments to a particular no every time
e.g.
int count=0
for(i=1;i<=50000000;i++)
count = count+i
|
|
|
|
|
Later I'll be adding a "wait time option" so I gotta go by time... Just looking for the easiest way to code in a timer into a loop.
|
|
|
|
|
Ok.. I think I figured out the easiest way
DWORD dwStart = GetTickCount();
while( GetTickCount() - dwStart < WAITTIME ){
//loop for WAITTIME milliseconds
}
|
|
|
|
|
What about WM_TIMER ?
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.
|
|
|
|
|
I am confused that why we have to pass a reference of same class type into a copy constructor? I searched a lot but i am not able to find out the exact answer.So,plz if anybody can forward me the relevant answer of this question then plz forward it as soon as possible.Please specify the reason.
thanks..
|
|
|
|
|
For that you need to know, in which cases copy contructor constructor get called.
One of the place where it is called is when we pass parameter by value.
Thats why, to avoid recursive call, prameter to copy constructor is passed by reference.
-- modified at 4:48 Wednesday 13th December, 2006
|
|
|
|
|
pan_angel wrote: why we have to pass a reference of same class type into a copy constructor?
Obviously you'd.
Read it here[^]. I suggest you to read a good book on c++ or rather on the object oriented paradigm.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
pan_angel wrote: I am confused that why we have to pass a reference of same class type into a copy constructor?
Which part are you confused about: the reference has to be the same class or that you have to
pass a reference?
The reference has to be the same class because it is a copy constructor - used to construct a copy
of an object of the class, as it's name implies.
The reference has to be there because it's the only way to access the object which needs to be
copied.
|
|
|
|
|
Hello everyone,
I am creating an array of structure as
struct Table
{
RFC_CHAR fieldname[35],
fieldvalue[255];
};
Table t2[2];
Now i m initialising this array in a funtion and i want the funtion to return this structure
as well as in another function i want to recieve this array and finally i want a pointer to point to this function
please tell me how can i do this
|
|
|
|
|
And what is the question?
Maybe you don't know how to pass the array?
Then have a look at the following code snippet:
<br />
void testStruct(Table *tp)<br />
{<br />
tp[0].fieldname = ...<br />
<br />
}<br />
hope that helps...
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.
|
|
|
|
|
no i dont want to pass the array to a function
i have created array of a structure and initialised it in function A and A returns this array
the struct is declared global
now in function B i want to call funtion A and take its return value which would be the array in an array variable
|
|
|
|
|
Sorry, I can't figure what do you want to do...
Can you please post the code snipped that is giving you troubles?
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.
|
|
|
|