Rob4077
asked on
Is it possible to connect to a DBF file whose path is entered on a form?
I need to write a rather small application that will enable a user to select a file path that contains some dbf files before connecting to those files (I need to connect exclusively - no other application is allowed to be using those files while this one has them) and then opening another window to allow some additions to be made. In MS Access I think I could manage this relatively easily but I would like to use it as a learning exercise in VB.Net
My question is: How would I connect to a DBF file whose path is entered on a form?
My question is: How would I connect to a DBF file whose path is entered on a form?
ASKER
Thanks for the comments and solution.
You said >>The answer depends on how you need it, and what you are going to do once you get the data.<<
Once I have connected a new form will need to list the records in the file. I need to give the user the ability to edit existing records or press a button alongside a selected record and use that record as a template to add a new record. The user then simply makes a few additional changes to the new record. When the user has finished adding/editing records I need to sort the table by a key field and save it before closing the application.
Is this going to be asking too much?
You said >>The answer depends on how you need it, and what you are going to do once you get the data.<<
Once I have connected a new form will need to list the records in the file. I need to give the user the ability to edit existing records or press a button alongside a selected record and use that record as a template to add a new record. The user then simply makes a few additional changes to the new record. When the user has finished adding/editing records I need to sort the table by a key field and save it before closing the application.
Is this going to be asking too much?
ASKER
BTW, your instructions connect to an mdb file. Can VB.Net connect to a dbf file?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Brilliant. thank you very much!!!!
http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbconnectionstringbuilder.aspx
Open in new window