3 messages in com.mysql.lists.win32Re: DAO with mysql 5.0
FromSent OnAttachments
Mark Mchugh15 Nov 2005 07:46 
SGr...@unimin.com15 Nov 2005 08:07 
jbon...@sola.com.au16 Nov 2005 14:12 
Subject:Re: DAO with mysql 5.0
From:SGr...@unimin.com (SGr@unimin.com)
Date:11/15/2005 08:07:09 AM
List:com.mysql.lists.win32

Mark Mchugh <mark@yahoo.com> wrote on 11/15/2005 10:46:41 AM:

Hi, I am using the following code

Set dbEmployees = OpenDatabase("", dbDriverComplete, False, "ODBC;DSN=myEmployees;UID=root;PWD=;Database=Employees")

Set recsetEmployees = dbEmployees.OpenRecordset("employees", dbOpenDynaset)

Set Data1.Recordset = recsetEmployees

is there anyway to have a DAO recordset that i can define the sql?

i.e. "Select * from employees where age > 30"

thanks

First, verify that you are using DAO and not ADO.

Here is an example of using DAO to populate some forms. They use the database.OpenRecordset() method but I am sure there are more ways to do it. Have you actually read the DAO documentation? http://support.microsoft.com/default.aspx?scid=kb;en-us;164582

I found an archived copy of the DAO docs here: http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/office97/html/output/F1/D2/S5A25F.asp

And a C++ version here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_Database_Topics_.28.DAO.29.asp

Having worked with both, the C++ and VB/VBA interfaces are similar enough that the methods and parameters are close enough for you to use one set of docs to work with the other language.

Sorry! I ran out of time or I would keep searching for you...

Shawn Green Database Administrator Unimin Corporation - Spruce Pine