How to get a parametrized, non-ReadOnly Recordset?

How to get a parametrized, non-ReadOnly Recordset?

Post by Attila Szuc » Sun, 14 Jan 2001 00:59:30



I'd like to have the result of a parametrized Recordset with LockOptions set
to BatchOptimistic.

I've found that only the Command object has Parameters collection. The
Command.Execute method returns the recordset well, but it sets the
LockOptions property to adLockReadOnly.

With the Recordset object i can open a recordset with any LockOptions
setting but cannot pass Parameters since the Recordset object doesn't have
such thing.

I would be very grateful if somebody could give me a way-out from this
situation.

Attila

 
 
 

How to get a parametrized, non-ReadOnly Recordset?

Post by Attila Szuc » Sun, 14 Jan 2001 02:01:25


I could also use a Command object in the Recordset.Open function, which
works fine, but then i cannot disconnect the recordset by setting the
ActiveConnection property to NULL (this property is ReadOnly).

The question is:
How to create a parametrized, adLockUpdateBatch, Disconnected Recordset.

Thanks for any input,
Attila

 
 
 

How to get a parametrized, non-ReadOnly Recordset?

Post by Roger Mort » Sun, 14 Jan 2001 20:16:52



Quote:

> I could also use a Command object in the Recordset.Open function,
which
> works fine, but then i cannot disconnect the recordset by setting the
> ActiveConnection property to NULL (this property is ReadOnly).

This ought to be the right way to go,  but the Recordset
ActiveConnection will be Null anyway. To make this syntax work
properly, you'd need to set up the Command object with its own
ActiveConnection property, prior to calling RecordSet.Open with an
empty ActiveConnection parameter.

I guess the way to disconnect it would then be to set the Command
object's ActiveConnection to Null - though I've never tried it.

Roger Morton

 
 
 

1. Getting records with a parametrized View.

When I have a parametrized view and parameter is char type I use "%" to get
all records from data source. How can I get all records when parameter is
integer type?

------------------------------------
Gabriel Dovalo Carril

http://teleline.terra.es/personal/dovalo
 ----------------------------

2. MSDE Security for HIPAA

3. ? DBGrid with additional *non-readonly* columns ?

4. Games wares softwares music

5. Parametrized recordset

6. How do I move a Database

7. TableFrame readOnly property gets stuck!

8. Database readonly - only it's not readonly

9. ReadOnly Table in ReadOnly Directory

10. ReadOnly DB in ReadOnly Directory?

11. RecordSet is Readonly