Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionautomation files and excel Pin
prithaa22-Sep-09 20:40
prithaa22-Sep-09 20:40 
QuestionHelp with regex in VS2008 Pin
theCPkid22-Sep-09 20:22
theCPkid22-Sep-09 20:22 
AnswerRe: Help with regex in VS2008 Pin
theCPkid22-Sep-09 21:37
theCPkid22-Sep-09 21:37 
QuestionSave as Excel file Pin
Davitor22-Sep-09 19:58
Davitor22-Sep-09 19:58 
AnswerRe: Save as Excel file Pin
Davitor22-Sep-09 21:29
Davitor22-Sep-09 21:29 
GeneralRe: Save as Excel file Pin
Chandrasekharan P23-Sep-09 4:06
Chandrasekharan P23-Sep-09 4:06 
GeneralRe: Save as Excel file Pin
Davitor23-Sep-09 18:13
Davitor23-Sep-09 18:13 
QuestionODBC error: Expression too complex Expression too complex [modified] Pin
narendra91122-Sep-09 18:53
narendra91122-Sep-09 18:53 
Hi,
I have a interface to interact with MS-Access database file. I m using CODBCRecordset for accessing DB.
CODBCRecordset class[^]

It was working fine untill I added new field in one of the table.

I added new field ("Lock1" - a integer field) in table (called "Quotation_DB").
This table have bunch of data (int,double,strings). I have a button in my interface which will set this "Lock1" field to 0/1 in separate function. when i click this button i get following error.
//==================
Expression too complex
Expression too complex
//==================
yes it is printing same message twice.

any kind of help will be good to me. Please let me know if i have to provide more information.

This is what i m doing in my function.
BOOL LockUnlockQuotation(BOOL flg_lock)
{

    CODBCRecordset m_RS_RFQ(&DataBase);
    BOOL flg_update = false;

    if( !m_RS_RFQ.Open("SELECT * FROM \"Quotation_DB\"") )
    {
        TRACE("Failed to run query: \"%s\"\n","SELECT * FROM \"Quotation_DB\"");
        return false;
    }
    else
    {
        if(!m_RS_RFQ.IsEOF())
        {
            m_RS_RFQ.MoveFirst();
        }

        CString Quot_revID_db="";
        //get record set
        while(!m_RS_RFQ.IsEOF())
        {
            Quot_revID_db=m_RS_RFQ.GetString("QuotID");
            if(Quot_revID.Compare("MyQoute2009")==0)
            {
                m_RS_RFQ.Edit();
                m_RS_RFQ.Field("Lock")=1;//setting field value

                m_RS_RFQ.Update();//code is throwing error at this point


                flg_update =true;
                break;
            }
            m_RS_RFQ.MoveNext();
        }
        m_RS_RFQ.Close();
    }

    return flg_update;

}


modified on Wednesday, September 23, 2009 3:08 PM

GeneralRe: ODBC error: Expression too complex Expression too complex [modified] Pin
narendra91123-Sep-09 5:44
narendra91123-Sep-09 5:44 
QuestionODBC error: Expression too complex Pin
narendra91122-Sep-09 18:52
narendra91122-Sep-09 18:52 
GeneralRe: ODBC error: Expression too complex [modified] Pin
narendra91123-Sep-09 5:44
narendra91123-Sep-09 5:44 
QuestionCalling The Thread function Pin
VVVimal22-Sep-09 18:50
VVVimal22-Sep-09 18:50 
AnswerRe: Calling The Thread function Pin
Naveen22-Sep-09 19:26
Naveen22-Sep-09 19:26 
AnswerRe: Calling The Thread function Pin
chandu00422-Sep-09 20:44
chandu00422-Sep-09 20:44 
QuestionThread Pin
VVVimal22-Sep-09 18:49
VVVimal22-Sep-09 18:49 
AnswerRe: Thread Pin
CPallini22-Sep-09 20:54
mveCPallini22-Sep-09 20:54 
QuestionQuestion about structure [modified] Pin
liang30622-Sep-09 16:59
liang30622-Sep-09 16:59 
AnswerRe: Question about structure Pin
Naveen22-Sep-09 18:39
Naveen22-Sep-09 18:39 
Question[Solved] What is the 32-bit form of the _InterlockedIncrement intrinsic? Pin
Skippums22-Sep-09 8:15
Skippums22-Sep-09 8:15 
AnswerRe: What is the 32-bit form of the _InterlockedIncrement intrinsic? Pin
cmk22-Sep-09 10:24
cmk22-Sep-09 10:24 
GeneralRe: What is the 32-bit form of the _InterlockedIncrement intrinsic? Pin
Skippums22-Sep-09 10:53
Skippums22-Sep-09 10:53 
GeneralRe: What is the 32-bit form of the _InterlockedIncrement intrinsic? Pin
cmk22-Sep-09 10:59
cmk22-Sep-09 10:59 
GeneralRe: What is the 32-bit form of the _InterlockedIncrement intrinsic? Pin
Skippums22-Sep-09 11:14
Skippums22-Sep-09 11:14 
GeneralRe: What is the 32-bit form of the _InterlockedIncrement intrinsic? Pin
cmk22-Sep-09 11:55
cmk22-Sep-09 11:55 
AnswerRe: [Solved] What is the 32-bit form of the _InterlockedIncrement intrinsic? Pin
Randor 22-Sep-09 12:04
professional Randor 22-Sep-09 12:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.