File dialog and Data Adapter

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

Is it possible pass the file name from a File Dialog to the Data Adapter? I
need to select an Access database to "open". There are many different access
files which have the same data structure. I know I can copy the file to a
temp.mdb and handle it that way. I was just wondering if there is an easier
way?
 
You can specify the Select command (as well as UPdate,insert & Delete) and
the command object has a connection property You can use the file dialog to
get the file, and then build the Connection and command objects. Pass the
command with a valid connection to your adapter.

HTH,

Bill
 
Hi,

You cannot specify the file name for the DataAdapter, but you could specify
file name of the Access database in a connection string for the command,
associated with the DataAdapter
 
Back
Top