D
DaveCop
I have an Access application which needs to include/work
with some data that resides on a SQLServer database.
Currently I have access to a stored procedure on the SQL
system which returns a recordset (ADO, but could use DAO).
Since the sp on SQL needs to be called via pass thru (or
at least I don't know of another way to execute it) and
since it also requires parameters (e.g. a date but not
normally todays date), I 'have to' (again AFAIK) build the
proper pass thru sql statement in VBA and execute it from
there.
That all works fine (i.e. I get my data back in the
recordset) but now I need to 'work on' this data.
Basically I need to selectively move some or all of this
data into an Access table. How do I 'move' the SQL
recordset over into an Access table? I probably could open
another rs in Access pointing to the proper Access table
and do a field by field, row by row operation to populate
the Access table, but I suspect this will be relatively
slow. I hate doing things that way.
Is there a better way to move the recordset into the
table? Is there a way I can directly query the SQL
recordset? Is there some way to have the SQL directly
populate a table (even if that has to be on the SQL side
[good!!!], I can probably get 'those guys' to modify the
stored procedure)?
[Personally since I typically only need a small sub-set of
the data returned, I would prefer to just link to the sql
table(s) and query them for the precise data I need but
for other reasons (a long story) that is not possible.]
Thanks for any help,
Dave
with some data that resides on a SQLServer database.
Currently I have access to a stored procedure on the SQL
system which returns a recordset (ADO, but could use DAO).
Since the sp on SQL needs to be called via pass thru (or
at least I don't know of another way to execute it) and
since it also requires parameters (e.g. a date but not
normally todays date), I 'have to' (again AFAIK) build the
proper pass thru sql statement in VBA and execute it from
there.
That all works fine (i.e. I get my data back in the
recordset) but now I need to 'work on' this data.
Basically I need to selectively move some or all of this
data into an Access table. How do I 'move' the SQL
recordset over into an Access table? I probably could open
another rs in Access pointing to the proper Access table
and do a field by field, row by row operation to populate
the Access table, but I suspect this will be relatively
slow. I hate doing things that way.
Is there a better way to move the recordset into the
table? Is there a way I can directly query the SQL
recordset? Is there some way to have the SQL directly
populate a table (even if that has to be on the SQL side
[good!!!], I can probably get 'those guys' to modify the
stored procedure)?
[Personally since I typically only need a small sub-set of
the data returned, I would prefer to just link to the sql
table(s) and query them for the precise data I need but
for other reasons (a long story) that is not possible.]
Thanks for any help,
Dave