Solved

dbgrid & access 2000

Posted on 2000-03-24
2
204 Views
Last Modified: 2010-05-02
i am trying to read a database using a data control, the following error ocurs<<<Unrecognized database format <filename>. (Error 3343)>>>.

other forms are ok reading. the code i use is<<  Me.Data1.DatabaseName = (App.Path & "\NewMaster.mdb")

  Me.Data1.RecordSource = "select * from tblcustomers"

it sops at data1.refresh

i tried to repair database as suggested, but same problem. same data controls used in Access 97 dbase, works ok.

many thanks
0
Comment
Question by:sml41
2 Comments
 
LVL 1

Accepted Solution

by:
okcman earned 70 total points
ID: 2657559
http://www.microsoft.com/data/ado/adotechinfo/dao2ado.htm

here is a link about ADO and DA0 and access2000
 To add these references in Visual Basic:

Open a project.
From the Project menu select References…
From the list, select "Microsoft ActiveX Data Objects 2.1 Library."
From the list, select "Microsoft ADO Ext. 2.1 for DDL and Security."
From the list, select "Microsoft Jet and Replication Objects 2.1 Library."
Click OK.

they explained that the preferred way is  to ADO and do this:


Dim cnn As New ADODB.Connection
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Nwind.mdb;"

if you are using both, they both have to be defined explicitly


hope this helps :)  


0
 

Author Comment

by:sml41
ID: 2737357
Yes many thanks, it works ok
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Access 2016 VB code 9 102
add text to end of existing text in file 16 69
Windows 10 start screen issues 9 51
Error when passing an argument to a vb6 that contains  '/' 7 31
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now