Problem - Recordset Readonly

Problem - Recordset Readonly

Post by jayanan » Thu, 30 Jan 1997 04:00:00



Hi All,
        I have a very peculiar problem. I am using Visual C++ 4.2 , SQL-Server
6.5 on Window NT 4.00.
When I try to Add, Update or delete records using the AddNew,Update and
Delete methods of my Recordset , I find that the recordset is readonly.
I am connecting to SQL-SERVER thru ODBC (SQLSRV32.DLL V2.65.0213). I
have given permissions to the user to delete, update and add to all the
tables in my Database. The Security type in SQL-SERVER is set as
"Standard". I am able to update the database through sql statments when
I use ISQL tool logging into SQL-SERVER as the same user as before. Why
is this??. Can anyone help me Please.....

Thanking you guys in advance,

Rajagopalan Anand.

 
 
 

Problem - Recordset Readonly

Post by Andersen Consultin » Sat, 01 Feb 1997 04:00:00



> Hi All,
>         I have a very peculiar problem. I am using Visual C++ 4.2 , SQL-Server
> 6.5 on Window NT 4.00.
> When I try to Add, Update or delete records using the AddNew,Update and
> Delete methods of my Recordset , I find that the recordset is readonly.

I encountered the same problem in my development. To be more
specific, the recordset is updatable if I instantiate the
recordset with CRecordset::CRecordset(NULL), however, if I
instantiate it with a CDatabase object (ie CRecordset(pDB) ).
The resulted recordset will become read-only! I've checked
the CDatabase object beforehand and it is updatable. And
it is opened by

        CDatabase::OpenEx("<Connection String>",
                                CDatabase::noOdbcDialog);

Can anyone solve this problem for me and jayanand? Thanx

Brownson

 
 
 

Problem - Recordset Readonly

Post by Todd Gerat » Sat, 08 Feb 1997 04:00:00




Quote:> I encountered the same problem in my development. To be more
> specific, the recordset is updatable if I instantiate the
> recordset with CRecordset::CRecordset(NULL), however, if I
> instantiate it with a CDatabase object (ie CRecordset(pDB) ).
> The resulted recordset will become read-only! I've checked
> the CDatabase object beforehand and it is updatable. And
> it is opened by
>    CDatabase::OpenEx("<Connection String>",
>                            CDatabase::noOdbcDialog);

Hi,

I'm also having the same problem.  But even instantiating the recordset
with CRecordset::CRecordset(NULL) does not work.  It's still read only!
I've tried pretty much everything, and I can't get it to work.  Is there
someone who has found a solution to this problem?

Todd

 
 
 

Problem - Recordset Readonly

Post by Frank J. Hoffma » Tue, 11 Feb 1997 04:00:00


I had the same problem, but I later found out that with my ODBC driver
snapshots were updatable while dynasets were not.  Have you tried switching
the recordset type?  It shouldn't matter, but for some odd reason it did
with me.

Frank J. Hoffman





> > I encountered the same problem in my development. To be more
> > specific, the recordset is updatable if I instantiate the
> > recordset with CRecordset::CRecordset(NULL), however, if I
> > instantiate it with a CDatabase object (ie CRecordset(pDB) ).
> > The resulted recordset will become read-only! I've checked
> > the CDatabase object beforehand and it is updatable. And
> > it is opened by
> >       CDatabase::OpenEx("<Connection String>",
> >                               CDatabase::noOdbcDialog);

> Hi,

> I'm also having the same problem.  But even instantiating the recordset
> with CRecordset::CRecordset(NULL) does not work.  It's still read only!
> I've tried pretty much everything, and I can't get it to work.  Is there
> someone who has found a solution to this problem?

> Todd