If you use a DAO database object, you need to use a DAO Recordset. If you
want to use an ADO Recordset, you must use an ADO Connection. ADO does not
have a "Database" object.
On 29 Dec 2003 00:58:43 -0800,
pragatisagar@yahoo.com (Pragati) wrote:
[color=blue]
>Hi !
>
>I have an SQL query which im developing on the click of a command
>button on a form.
>
>but am stuck up in creating a recordset of that query.
>how should one connect to database? use adodb or dao connection? are
>there any particular setting reqd in vb editor?
>what will be the syntax for connecting to a databse?
>what shud be the syntax for opening my query in a recordset?
>
>if i say
>dim db as dao.database
>dim rs as adodb.recordset
>or
>dim db as adodb.database
>dim rs as adodb.recordset
>i get an error message saying "object not defined" ???
>
>also ... can i pass a recordset variable to another form or report?
>can a recordset created in one form be accessed in some other
>form/report?
>
>please help. this is kind a urgent... !
>thanks in advance
>pragati[/color]