Calculated values from different functions to a single function.
-
It's true pal. But if I change my code now it can be a real mess for me. Because I have to change lots of coding parts in my code.
I appreciate your help all the time... Eranga :)
Declare the variables at the header, initialize them in the constructor and use "search and replace" to change the names is a lot of work? What do u prefer? Do that "lot" of work now? Or having scope/access problems in every thing you code afterwards?
Greetings. -------- M.D.V. If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you “The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson ;)
-
Declare the variables at the header, initialize them in the constructor and use "search and replace" to change the names is a lot of work? What do u prefer? Do that "lot" of work now? Or having scope/access problems in every thing you code afterwards?
Greetings. -------- M.D.V. If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you “The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson ;)
Now actually I have no idea what to do... :| Here is a one function I've used.
void CSRFDBDlg::GetMess(int length, char * buffer, ADODB::_RecordsetPtr pRecSet) { UpdateData(TRUE); _variant_t vtData; // VARIANT data type long nRetLength = 0; // Dummy value _variant_t vAppendChunck = BinaryToVariant((BYTE*)buffer, length, nRetLength); pRecSet->Fields->GetItem("Bio_Data")->AppendChunk(vAppendChunck); vtData.vt = VT_I2; vtData.iVal = (int)nRetLength; pRecSet->Fields->GetItem("Bio_Size")->PutValue(vtData); }
Here I have two values to store in the database.I appreciate your help all the time... Eranga :)