How to see my sql in recorset?

H

hanski

Hi

I have this kind of recorset:

Dim PUTKI As New ADODB.Connection
Dim maksi As New ADODB.Recordset

Set PUTKI = CurrentProject.Connection

maksi.Open "Select max(field1) from Database", PUTKI, adOpenDynamic,
adLockOptimistic



How can I see the result of maksi? I want to know is it correct!!


Hannu
 
R

RoyVidar

hanski wrote in message
Hi

I have this kind of recorset:

Dim PUTKI As New ADODB.Connection
Dim maksi As New ADODB.Recordset

Set PUTKI = CurrentProject.Connection

maksi.Open "Select max(field1) from Database", PUTKI, adOpenDynamic,
adLockOptimistic



How can I see the result of maksi? I want to know is it correct!!


Hannu

For debugging purposes (for any recordset), try

debug.print maksi.getstring

Then check it out in the immediate pane (ctrl+g)
 
Top