Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

URGENTE!!! Error abriendo Recorset en Access 20000

100 views
Skip to first unread message

Juan Manuel Alvarez Míguez

unread,
Apr 5, 2000, 3:00:00 AM4/5/00
to
He tenido que convertir una base de datos en Access 97 al 2000
la cual tiene codigo Vba.
Pero me he encontrado con el problema de que no me funciona
una simple apertura de un Recordset ( El error lo describo más adelante)
Para más información os diré que la he probado todas las versiones de
DAO (3,3.5,3.6) y además he probado en una base de datos en
Access 2000 nueva a abrir un Recordset y no funciona de ninguna manera.

Agradeceria muchísimo que si alguien sabe la solución o le ha pasado lo
mismo me respondiese

Por favor, Estoy con el agua al cuello!!!!!


Error Nº 13 "No coinciden los tipos"
Código:
Dim db As Database
Dim rst As Recordset
Set db = CurrentDb
Set rst = db.OpenRecordset("x", dbOpenDynaset)

x es una tabla normal con un solo campo
Pasa con cualquier tabla


Gracias.
Saludos.


jgarrido

unread,
Apr 5, 2000, 3:00:00 AM4/5/00
to
A mi me pasó algo parecido, después de pasar de Acces 1.0 a Acces 97, pero
abriendo una base de datos (opendatabase), y el error que me da es que no se
encuentra el control activeX, pero no se porque, por lo que tambien pedí
ayuda.

"Juan Manuel Alvarez Míguez" escribió:

Gerardo Folch

unread,
Apr 6, 2000, 3:00:00 AM4/6/00
to
Este tipo de errores suelo solucionarlos marcando en las referencias DAO 3.6
y, además, subiendo la prioridad de esta referencia al máximo, creo que
queda la tercera.

Al menos así lo he solucionado yo, claro que lo mejor sería aprender ADO,
pero cuando tenga tiempo.

Saludos,
--
Gerardo Folch
ICQ: 35364918

Carlos S.

unread,
Apr 9, 2000, 3:00:00 AM4/9/00
to
Efectivamente, haciendo referencia a la librería DAO 3.6 se puede abrir una
base de datos de Access 2000, se puede crear por código un objeto recordset,
pero yo no he conseguido asignar una tabla de Access 2000 a un objeto Data
de Visual Basic 6.0, aún estando esta referencia señalada. ¿Lo habéis
conseguido alguien?

Saludos.

Gerardo Folch <gerard...@coev.com> escribió en el mensaje de noticias
8ch6gs$19o$1...@diana.bcn.ttd.net...

Juan Manuel Alvarez Míguez

unread,
Apr 14, 2000, 3:00:00 AM4/14/00
to

Gracias a todos por vuestras respuestas , me han sido de gran ayuda. Por si
os interesa encontré este artículo
en una página americana.

Al parecer es una mamonada que tiene el access 2000 en la que si no quitas
la referencia al ADO
(que la pone por defecto) aunque añadas el DAO los recordsets abriertos no
funcionan porque se cree que
son de ADO.


---Posted by Dev Ashish---

----------------------------------------------------------------------------
----
Bugs: Access 2000: Type Mismatch or User Defined Type Not Defined
----------------------------------------------------------------------------
----


When you create a new database in Access 2000, the default data access
library used is ADO. That is, ADO will be selected under Tools/References
in VBE instead of DAO. Converted databases still retain DAO as the default
library and ADO will not be selected under References.

The "Type Mismatch" error occurs as the global class Recordset is evaluated
as ADODB.Recordset instead of the DAO.Recordset, while the "User Defined
Type Not Defined" error is generated at compile time because there is no
Database object in ADO.

To fix this problem, uncheck the ADO reference and check DAO 3.6 Library as
a new reference.

You may still receive this error message when referring to DAO Recordsets if
you have both ADO and DAO selected under References. This is because the
ADO reference is listed above DAO in the References dialog and hence, is
taking precedence at runtime when Access tries to resolve your data types.
To move the DAO reference above the ADO one in the dialog,

Uncheck the ADO reference.
Close the References dialog.
Open the dialog again.
Check the ADO reference.
Close the dialog.
If you are working with a database in which both ADO and DAO references are
selected, the best way is to always fully qualify your data types. For
example:

Dim rsCustomers as ADODB.Recordset
Dim rsInvoices as DAO.Recordset

For more details on which references to use in your application, view this
article.

Article ID: Q197110
ACC2000: References to Set When Working with Microsoft Access

Juan Manuel Alvarez Míguez <jua...@airtel.net> escribió en el mensaje de
noticias 8cg4i1$h5...@news.airtel.net...

0 new messages