hi all,
any one can help me that when i tried to connect .dbf foxpro3.0 database file to DAO control it throws an error like this "'F:\database\accno.dbf' isn't a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides", so how can i get recordsets from a dbf file via DAO control using VB6.0

When you code the connection path to the database, make sure that the database IS in the path specified. Your error is raised because the DAO wnats to connect to accno.dbf in a file called database on your F: drive. The database does however not exist in that path. Either copy the database to that path, or set the correct path in code to where the database is at the moment. The easiest would be to use

App.Path & "\accno.dbf"

, IF the database is in your project path.

Please find the connection strings here.

;)Debasisdas, I don't think the poster has a problem with the connection string, otherwise a different error would have been raised. The error raised in the post is definitely because of a connection to a database in the incorrect path. The poster needs to rectify the code to the correct path or copy the database to the correct path.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.