SQL query

  • Thread starter Peter Mairhofer
  • 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
 
V

Van T. Dinh

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.
 

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