Re: ODBC for SQL server using MFC

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I was able to fix my problem by below code:


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


thanks

"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