Re: Updateable ADO-Recordset from SProc(WithParameters) on SQLServer ?

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

From: Werner (zo_at_nospam.mbbm.de)
Date: 03/09/04


Date: Tue, 9 Mar 2004 10:32:04 +0100

Thank you a lot, Stephen: this was the solution of my problem!

Actually I had overlooked, that there is someting like
"Recordset.Open(Command)"!

In addition to be able to set .CursorLocation, .LockType ... this also
allows me to set Recordset.Properties("Unique Table") = "ThisTable" to
restrict the updateability to the columns which emerge from ThisTable!

This helped me really very much!!!

Werner

"Stephen Howe" <stephenPOINThoweATtns-globalPOINTcom> schrieb im Newsbeitrag
news:Oj3AUzUBEHA.2800@tk2msftngp13.phx.gbl...
> > - If the SProc I am using has parameters, and I create the Recordset
> using
> > an ADO Command object, I get any recordset I want and I pass any
> parameters
> > I want back and forth BUT: the Recordset just refuses to be updateable!
> >
> > Has anybody ever created an updateable recordset using a
> > SProc(WithParameters) ?
>
> Yes. But first things first:
>
> All default Recordsets returned by a Command object will be
>
> (i) Forward-only and Read-only if the default Connection location is
> server-sided
> (ii) Static and Read-only if the default Connection location is
client-sided
>
> and therefore not updateable.
>
> To get a non-default Recordset, you need to setup the Recordset properties
> (but not ActiveConnection) and then do Recordset Open() passing as the
> Source parameter, the Command object (which does have the Connection
setup).
> This will get you what you want.
>
> Stephen Howe
>
>
>



Relevant Pages

  • Re: Command Oject to pass parameters and CursorLocation
    ... recieved any results in my recordset. ... The Cursor location for RecordSet returned is whatever the current Cursor ... Location of the underlying Connection for Command object is set to. ... DO NOT set Connection. ...
    (microsoft.public.data.ado)
  • Re: Command Oject to pass parameters and CursorLocation
    ... recieved any results in my recordset. ... The Cursor location for RecordSet returned is whatever the current Cursor ... Location of the underlying Connection for Command object is set to. ... DO NOT set Connection. ...
    (microsoft.public.data.ado)
  • Re: Command Oject to pass parameters and CursorLocation
    ... recieved any results in my recordset. ... The Cursor location for RecordSet returned is whatever the current Cursor ... Location of the underlying Connection for Command object is set to. ... DO NOT set Connection. ...
    (microsoft.public.data.ado)
  • Re: reusing command object
    ... the recordset and make updates to certain records. ... Dim cmd As New ADODB.Command ... Dim rst As ADODB.Recordset ... command object as its connection parameter. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: HELP! Error on Stored Procedure - AbsolutePage Property
    ... > "Current Recordset does not support bookmarks. ... > 'Connect command object to database (as I understand how you said to do ... SQL Server is a very capable provider, ... Of course all of this assumes the underlying SQL (in the stored procedure) ...
    (microsoft.public.vb.database.ado)