0

Hi.... I am a student.

When i tried to connect VB with Access, it is giving me this message "Run-time error 13, Type Mismatch" Below is the code

Dim DBase As Database
Dim RBase As Recordset

Set DBase = OpenDatabase("DB Name")
Set RBase = DBase.OpenRecordset("Table name")

The funniest thing is, this same code works on another project on the same computer.

Somebody help meeeeeeeeeeeee.

Edited by peter_budo: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)

4
Contributors
6
Replies
8
Views
7 Years
Discussion Span
Last Post by akhileshbc
0

What is the version of the database you are having problems with? You may have to convert it to a previous version...

Another thought. Did you add the reference to the data access object?

Good Luck

0

What is the version of the database you are having problems with? You may have to convert it to a previous version...

Another thought. Did you add the reference to the data access object?

Good Luck

Yes I add everything

0

if you want to use upper version of office then you need service pack 6 of vb6.

How can we get this service pack 6?

0

Dim DBase As Database
Dim RBase As Recordset

Set DBase = OpenDatabase("DB Name")
Set RBase = DBase.OpenRecordset("Table name")

Try to use database name and table names without spaces. eg: DBName , TableName...

Which line shows the error ?

Make sure that the data saved to the database is of the same datatype of those in the Fields...

eg: "abcd"(string) to IntegerField is not applicable...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.