SQL query

  • Thread starter Thread starter Peter Mairhofer
  • Start date Start date
P

Peter Mairhofer

Hi,

I have to execute an SQL query similar to PHP.
I want just make a dynamical query in enumerate
all rows in a for loop.

For example:

dim sql as SQLquery

sql.query("SELECT name1 FROM table LEFT JOIN (...) WHERE (...) GROUP BY
(...)")

for i to sql.num_rows
sql.selectfield(1)
MsgBox sql.fetch_row_by_field
resume

Can anybody help me??

Peter
 
Check Access VB Help on Recordset. You can create a Recordset based on a
query and then traverse the whole Recordset.

You can use either DAO Recordset or ADO Recordset.
 
Back
Top