Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Vancouver, Br. Columbia, Canada
    Posts
    632
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Simultaneous data from DBF and MDB (VB.NET)

    A struggling .NET newbie...

    Data exist in two files -- a MDB (Jet 4.0) and a DBF file. The DBF file is part of a 3-file "Shapefile" set from a mapping program, and cannot be imported into the MDB file. There is no choice about the .NET environment -- the mapping tool that I am using is .NET only.

    I am trying to JOIN two tables from the two files to determine which records exist in the MDB file but not in the DBF file. Once I have the list of "new" records, I will do some additional processing on them. I am quite familiar with MS Access, and if that were the programming environment, I would create a link to each of the tables and do an outer join, but I am not familiar enough with .NET to know if such a process is feasible.

    Can somebody tell me whether it's feasible to do this function, and if so, provide me with the basic concept of how to proceed. So far, I have opened a connection to the MDB file and created an SQLReader object to read its data, but I don't understand how to combine the data from two sources.

    Thanks much.
    --------------------------------------------------
    Jack MacDonald
    Vancouver, Canada

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Simultaneous data from DBF and MDB (VB.NET)

    I'm not familiar with reading DBF data into .NET, but if it supports OLEDB or ODBC you can do this easily.

    I would recommend using a Data Adapter to populate a DataSet object with data from each source. Then you can add a relationship between the desired tables and fields within the dataset (which is like a mini relational database). From there, you *should* be able to perform selects from both tables. Otherwise, you can iterate each row in one table and check for existing rows in the other table.

    You will find a host of information on any of the techniques I mentioned by searching google.

    Hope this helps!

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Vancouver, Br. Columbia, Canada
    Posts
    632
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Simultaneous data from DBF and MDB (VB.NET)

    Thanks, Mark. That was exactly the kind of info I required.
    --------------------------------------------------
    Jack MacDonald
    Vancouver, Canada

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •