Re: datatype mismatch error 13

From: JingleBEV (n_quan_at_NOSPAMyahoo.com)
Date: 06/30/04

  • Next message: Chris Mills: "Re: Access 2003 Developer Extensions: Copy ACCESSRT.MSI failing"
    Date: Tue, 29 Jun 2021 21:35:13 -0400
    

    Thanks for the feedback, guy

    "Bruce M. Thompson" <bthmpson@big_NOSPAM_foot.com> wrote in message
    news:#J9XPKiXEHA.2972@tk2msftngp13.phx.gbl...
    > > Iam coding data access application with database object and recordset.
    > > Here' s my code
    > > '------------------------------------------------------------------
    > > Private Function CreateRecordSet() As Boolean
    > > Dim db As Database
    > > Dim rs As Recordset
    > > Set db = DBEngine.Workspaces(0).OpenDatabase(txtDBpath)
    > > sql = "SELECT * FROM TblMembers"
    > > Set rs = db.OpenRecordset(sql, dbOpenDynaset) 'THE
    ERROR
    > > APPEARS HERE
    > [...]
    > > I got an error 13 at runtime that says "Type mismatch".
    > [...]
    > > Can someone tell me why I got that error at runtime.
    > >
    > > I am running
    > > windows xp
    > > visual basic 6,
    > > mdb file was create in Access 2003 and converted to Access97
    >
    > You obviously have references to both ADO and DAO. You should disambiguate
    in
    > your typing to avoid this problem:
    >
    > Dim db As DAO.Database
    > Dim rs As DAO.Recordset
    >
    > Note that only a recordset object is represented in both ADO and DAO but
    for
    > clarity purposes I have explicitly typed the database object also (there
    is no
    > database object in ADO).
    >
    > --
    > Bruce M. Thompson, Microsoft Access MVP
    > bthmpson@mvps.org (See the Access FAQ at http://www.mvps.org/access)
    > >> NO Email Please. Keep all communications
    > within the newsgroups so that all might benefit.<<
    >
    >


  • Next message: Chris Mills: "Re: Access 2003 Developer Extensions: Copy ACCESSRT.MSI failing"