help:use recordset's dynamic properties in vc++

help:use recordset's dynamic properties in vc++

Post by zwzha » Thu, 14 Jun 2001 15:06:08



i will use the "Update Resync" dynamic properties in vc++(my database is sql
server 2000),
following is my code:
         m_pRecordSetPtr->Properties("Update Resync") =
adResyncAutoIncrement;
but when compile,the error appear
error C2064: term does not evaluate to a function

anybody help me,thx very much:-)

 
 
 

help:use recordset's dynamic properties in vc++

Post by Sebastian Broghamme » Thu, 14 Jun 2001 15:30:13


Hi,

Quote:

> following is my code:
>          m_pRecordSetPtr->Properties("Update Resync") =
> adResyncAutoIncrement;

what type is m_pRecordSetPtr ? Is it a CComPtr <_Recordset> ?
If yes do it like that

CComPtr <Properties> spProps
CComPtr <Propert<> spProp
m_pRecordSetPtr->get_Properties (&spProps)
spProps->get_Item (CComVariant (L"Update Resync), &spProp)
spProp->put_Value (adResyncAutoIncrement)

This code is not tested (but should work), and has no error handlers

If m_pRecordSetPtr is a _RecordsetPtr
m_pRecordSetPtr->Properties->Item ("Update Resync") should work

HTH

Sebastian

 
 
 

help:use recordset's dynamic properties in vc++

Post by zwzha » Thu, 14 Jun 2001 17:59:23


thx your reply
m_pRecordSetPtr is a _RecordsetPtr
but when i use the code you apply:
m_pRecordSetPtr->Properties->Item ("Update Resync")
the error appear:
error C2774: 'Item' : no 'put' method is associated with this property

can u tell me why? bless u:-)


Quote:> Hi,

> > following is my code:
> >          m_pRecordSetPtr->Properties("Update Resync") =
> > adResyncAutoIncrement;

> what type is m_pRecordSetPtr ? Is it a CComPtr <_Recordset> ?
> If yes do it like that

> CComPtr <Properties> spProps
> CComPtr <Propert<> spProp
> m_pRecordSetPtr->get_Properties (&spProps)
> spProps->get_Item (CComVariant (L"Update Resync), &spProp)
> spProp->put_Value (adResyncAutoIncrement)

> This code is not tested (but should work), and has no error handlers

> If m_pRecordSetPtr is a _RecordsetPtr
> m_pRecordSetPtr->Properties->Item ("Update Resync") should work

> HTH

> Sebastian

 
 
 

help:use recordset's dynamic properties in vc++

Post by Sebastian Broghamme » Thu, 14 Jun 2001 21:38:20


Sorry for sure it hast no put mehtod. It should work like this:
m_pRecordSetPtr->Properties->Item ("Update Resync")->Value =
adResyncAutoIncrement;

Hope it works now

Sebastian



> thx your reply
> m_pRecordSetPtr is a _RecordsetPtr
> but when i use the code you apply:
> m_pRecordSetPtr->Properties->Item ("Update Resync")
> the error appear:
> error C2774: 'Item' : no 'put' method is associated with this property

> can u tell me why? bless u:-)



> > Hi,

> > > following is my code:
> > >          m_pRecordSetPtr->Properties("Update Resync") =
> > > adResyncAutoIncrement;

> > what type is m_pRecordSetPtr ? Is it a CComPtr <_Recordset> ?
> > If yes do it like that

> > CComPtr <Properties> spProps
> > CComPtr <Propert<> spProp
> > m_pRecordSetPtr->get_Properties (&spProps)
> > spProps->get_Item (CComVariant (L"Update Resync), &spProp)
> > spProp->put_Value (adResyncAutoIncrement)

> > This code is not tested (but should work), and has no error handlers

> > If m_pRecordSetPtr is a _RecordsetPtr
> > m_pRecordSetPtr->Properties->Item ("Update Resync") should work

> > HTH

> > Sebastian

 
 
 

help:use recordset's dynamic properties in vc++

Post by Stephen How » Sun, 01 Jul 2001 02:06:13



Quote:> i will use the "Update Resync" dynamic properties in vc++(my database is
sql
> server 2000),
> following is my code:
>          m_pRecordSetPtr->Properties("Update Resync") =
> adResyncAutoIncrement;

That is not right.

m_pRecordSetPtr->Properties->Item["Update Resync"]->Value =
adResyncAutoIncrement;

Stephen Howe

 
 
 

1. Q188858 Setting the Recordset's dynamic Command Timeout Property does not time out

Hi,

An article in the Microsoft database, Q188858, specify that MDAC 2.7 have
this problem:

SYMPTOMS
Setting the Recordset's dynamic Command Timeout Property does not time out
the query.

We want to know if the problem is resolve with a new version of MDAC. I know
that MDAC 2.7 SP1 exist for download.  Is this version resolve the problem?

The MDAC 2.7 SP1A is available for download? And resolve what if it is?

The MDAC 2.8 is available for download? And resolve what if it is?

Thank for your help

2. adErrInvalidArgument driving me nuts! please advise

3. Ado recordset's dynamic property!!

4. Bit Mapped Indexes

5. Ado recordset's dynamic property!!!

6. Increasing SGA

7. Help Using Field.DataFormat property in VC++

8. How to keep an access database open througout the whole VB6 Programm??

9. 2nd Post: Help Using Field.DataFormat property in VC++

10. Read Jet-databas properties with ADO from vc++

11. Manipulating a recordset from a DataGrid's Recordset property

12. Problems in Using LOBs of ORACLE with VC's CRecordset

13. VERY URGENT, Problems in Using LOBs of ORACLE with VC's CRecordset