Re: ODBC for SQL server using MFC

Tech-Archive recommends: Fix windows errors by optimizing your registry



I was able to fix my problem by below code, but I got into another problem.
Now my code crashes at update statement with error : "Invalid
attribute/option
identifier". Does anyone have any clue on what is that error means.

m_compInStream-> m_bUpdatable = 1;
m_compInStream->m_bAppendable = 1;
m_compInStream->Edit();
m_compInStream->Update(); //Crashes here....


thanks in Advance,
Bhavin


"Bhavin Patel" <bpatel@xxxxxxxxx> wrote in message
news:u2SAaGCuFHA.4080@xxxxxxxxxxxxxxxxxxxxxxx
> Hi,
> I am currently using ORACLE 9i but I am trying to move to SQL server.
> Below is my code, I am getting very strenge error, I can retrieve all the
> data from database, but when I do .Edit(), the code crashes. Eventhough, I
> am opening the recordset dynaset, it still does not let me edit the
> recordset. I have SQL server(8.00.194), MDAC(2.71.9030.0), ODBC32.dll(
> version 3.520.9030.0). Is my ODBC drive old?
>
> ******************my code*********************************
> m_compInStream = new CComponentsInStream(Database);
> m_compInStream->Open(CRecordset::dynaset,"select * from
> tblComponentsInStream where FLUIDSTREAMSID = '12' ORDER BY
> COMPONENTSID",CRecordset::none);
> m_compInStream->Edit(); //Crashes here....
> *************************************************************
>
>


.



Relevant Pages

  • Re: ODBC for SQL server using MFC
    ... will let the MFC classes work properly. ... Please do not send email directly to this alias. ... > Now my code crashes at update statement with error: ... >> data from database, but when I do .Edit, the code crashes. ...
    (microsoft.public.data.odbc)
  • Re: STL question: is this O/T ?
    ... The reason your code crashes is you have an invalid ... This is because the type of represented souldbe unsigned char, ...
    (comp.lang.cpp)