DAO with mysql 5.0
am 15.11.2005 16:46:41 von Mark Mchugh
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
Mark
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: DAO with mysql 5.0
am 15.11.2005 17:07:31 von SGreen
--=_alternative 00588B87852570BA_=
Content-Type: text/plain; charset="US-ASCII"
Mark Mchugh 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
>
> Mark
>
>
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;1645 82
I found an archived copy of the DAO docs here:
http://msdn.microsoft.com/archive/default.asp?url=/archive/e n-us/office97/html/output/F1/D2/S5A25F.asp
And a C++ version here:
http://msdn.microsoft.com/library/default.asp?url=/library/e n-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
--=_alternative 00588B87852570BA_=--
RE: DAO with mysql 5.0
am 16.11.2005 23:12:30 von jbonnett
I think you can just write
Set recsetEmployees =3D
dbEmployees.OpenRecordset("Select * from employees where age > 30",
dbOpenDynaset)
It looks like you are using a data control. I find them more trouble
than they are worth, except for very simple database access. They are
good for beginners and allow you to get something going quickly but you
soon grow out of them when you try to do anything more complicated.
John B.
-----Original Message-----
From: Mark Mchugh [mailto:mark_mch@yahoo.com]=20
Sent: Wednesday, 16 November 2005 2:17 AM
To: mysql list
Subject: DAO with mysql 5.0
Hi,
I am using the following code
Set dbEmployees =3D OpenDatabase("", dbDriverComplete,
False,
"ODBC;DSN=3DmyEmployees;UID=3Droot;PWD=3D;Database=3DEmploye es")
=20
=20
Set Data1.Recordset =3D recsetEmployees=20
is there anyway to have a DAO recordset that i can
define the sql?=20
i.e. "Select * from employees where age > 30"
thanks
Mark
=09
__________________________________=20
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org