|
 |
access thread: open recordset in Access
Message #1 by "Santosh Gurung" <golbheda@y...> on Wed, 20 Mar 2002 03:10:24
|
|
I am trying to open recordset in Access, however I get type mismatch error
on set rst = db.OpenRecordSet(cql). I will appreciate your help. Thanks.
eg. dim db as database
dim rst as recordset
dim cql as string
cql = "Select Name From Employee"
set db = dbEngine.workspace(0).database(0)
set rst = db.OpenRecordSet(cql)
Message #2 by =?iso-8859-1?q?Sudharshan=20De=20Silva?= <css_placement3@y...> on Wed, 20 Mar 2002 15:25:44 +0800 (CST)
|
|
Hi,
This is how I will do it.
Set rst = db.OpenRecordset(cql, dbOpenDynaset)
Hope this helps.
Cheers.
--- Santosh Gurung <golbheda@y...> wrote: > I am
trying to open recordset in Access, however I
> get type mismatch error
> on set rst = db.OpenRecordSet(cql). I will
> appreciate your help. Thanks.
>
>
> eg. dim db as database
> dim rst as recordset
> dim cql as string
>
> cql = "Select Name From Employee"
> set db = dbEngine.workspace(0).database(0)
> set rst = db.OpenRecordSet(cql)
>
__________________________________________________
Do You Yahoo!?
Yahoo! Mobile - Jazz up your mobile phone! Get funky ringtones and logos!
http://mobile.yahoo.com.sg/
Message #3 by Omar Chaudry <OChaudry@b...> on Wed, 20 Mar 2002 09:37:55 -0000
|
|
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C1CFF2.E9BF2CE0
Content-Type: text/plain
Do you have the appropriate DAO library referenced? I would also suggest
prefixing object classes with DAO. E.g.
Dim db as dao.database
Also if you are using the current database then use a statement like this
instead:
Set db = currentdb
Provided you have the table employee and have referenced DAO lib the
following code should work.
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim cql As String
cql = "Select Name From Employee"
Set db = CurrentDb
Set rst = db.OpenRecordset(cql)
HTH
Omar
-----Original Message-----
From: Santosh Gurung [mailto:golbheda@y...]
Sent: 20 March 2002 03:10
To: Access
Subject: [access] open recordset in Access
I am trying to open recordset in Access, however I get type mismatch error
on set rst = db.OpenRecordSet(cql). I will appreciate your help. Thanks.
eg. dim db as database
dim rst as recordset
dim cql as string
cql = "Select Name From Employee"
set db = dbEngine.workspace(0).database(0)
set rst = db.OpenRecordSet(cql)
DISCLAIMER: The information in this message is confidential and may be
legally privileged. It is intended solely for the addressee. Access to this
message by anyone else is unauthorised. If you are not the intended
recipient, any disclosure, copying, or distribution of the message, or any
action or omission taken by you in reliance on it, is prohibited and may be
unlawful. Please immediately contact the sender if you have received this
message in error. Thank you.
Message #4 by ProDev <prodevmg@y...> on Wed, 20 Mar 2002 06:29:02 -0800 (PST)
|
|
--0-1491013856-1016634542=:63867
Content-Type: text/plain; charset=us-ascii
set db = CurrentDb
Santosh Gurung <golbheda@y...> wrote: I am trying to open recordset in Access, however I get type mismatch error
on set rst = db.OpenRecordSet(cql). I will appreciate your help. Thanks.
eg. dim db as database
dim rst as recordset
dim cql as string
cql = "Select Name From Employee"
set db = dbEngine.workspace(0).database(0)
set rst = db.OpenRecordSet(cql)
Lonnie Johnson, ProDev, Builders of MS Access Databases
Let us build your next MS Access database application.
http://www.galaxymall.com/software/PRODEV
Send and Receive payments for free with PayPal: http://www.paypal.com/refer/pal=Y6TYF7YF8E2JG
---------------------------------
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
|
|
 |