Processing Crosstabs in ADO

P

pietlinden

I'm basically opening recordsets and stuffing them into Word with the
code from Developer's Handbook. Everything works fine except when ADO
meets a crosstab query. One way that works (although it's ugly) is to
append the result of the Crosstab to an empty table, and then open
another ADO recordset off the table and then send that to Word.

Seems like it should be easier, but DAO does not have a GetString
method. Is this the easiest way to do it, or am I just making a lot
of work for myself? Is there a way of using GetRows and returning a
delimited string the way GetString does? The temp tables are messy,
but perhaps my only option.

Any thoughts?

Thanks!
Pieter
 
R

RoyVidar

I'm basically opening recordsets and stuffing them into Word with the
code from Developer's Handbook. Everything works fine except when
ADO meets a crosstab query. One way that works (although it's ugly)
is to append the result of the Crosstab to an empty table, and then
open another ADO recordset off the table and then send that to Word.

Seems like it should be easier, but DAO does not have a GetString
method. Is this the easiest way to do it, or am I just making a lot
of work for myself? Is there a way of using GetRows and returning a
delimited string the way GetString does? The temp tables are messy,
but perhaps my only option.

Any thoughts?

Thanks!
Pieter

What is your code?

Say

Dim rs As ADODB.Recordset
Set rs = CurrentProject.Connection.Execute("CrossTab",,adCmdStoredProc)
Debug.Print rs.GetString

works on my setup
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top