PC Review


Reply
Thread Tools Rate Thread

Copying from DBF into MDB - alternative to ADO method

 
 
Charles Evans
Guest
Posts: n/a
 
      26th Jan 2005
Hi!

Currently we are using the following method to copy (or link in this case) a
DBF table into an Access database. I'm running into very odd problems with
using ADO within .NET and was hoping i could eliminate the need for
referencing the ADO libraries by rewriting the code in ADO.NET.

Here is a snippet of the original code:

connMDB = new ADODB.ConnectionClass();
connMDB.Open( @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +
MDBPathAndFileName_ + ";User ID=Admin;Password=", null, null, 0 );
ADOX.Catalog cat = new ADOX.CatalogClass();
cat.ActiveConnection = connMDB;
//Create the new table.
ADOX.Table tbl = new ADOX.TableClass();
tbl.Name = NewTableName_;
tbl.ParentCatalog = cat;
//Set the properties to create the link.
tbl.Properties[ "Jet OLEDB:Create Link" ].Value = true;
tbl.Properties[ "Jet OLEDB:Link Datasource" ].Value = DBFPath_;
tbl.Properties[ "Jet OLEDB:Link Provider String" ].Value = "Dbase IV";
tbl.Properties[ "Jet OLEDB:Remote Table Name" ].Value = DBFName_;
//Append the table to the tables collection of the catalog.
cat.Tables.Append( tbl );

----------

Does anyone know of an ADO.NET equivalent?

Thanks in advance,

Charles





 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Alternative copy/delete method needed KevHardy Microsoft Excel Misc 2 11th Feb 2010 01:39 PM
Alternative method for crosstab qury Alp Bekisoglu Microsoft Access Queries 1 6th Apr 2007 05:28 PM
Alternative method to Not In robert d via AccessMonster.com Microsoft Access Queries 12 23rd Dec 2005 06:10 PM
Alternative method for SetPixel/GetPixel Erik Microsoft Dot NET Compact Framework 0 1st Oct 2005 01:53 PM
Use of DISINCT query or alternative method K Heath Microsoft Access Queries 2 23rd Oct 2003 02:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:53 AM.