If you do not want to create an Access Database you can use OleDb for
everything else (Excel-Tables can be created).
OleDb is part of the Framework should allways be on a PC where Framework is
installed (not true for ODBC where you must supply the
Microsoft.Data.Odbc.dll supplied by Microsoft.
In my DataBase Class I use Interop.ADOX.dll (offered for free from
http://www.herdt.de in their C# Courses) to create
an Access Database.
To read an Access Database to a DataSet you do the following :
///private const string s_DataSetNamespace = "MainFrame";
///private const string s_mj10777_Company = "mj10777.de.eu";
///private const string s_mj10777_Folder = "\\My
Documents\\"+s_mj10777_Company+"\\";
///private const string s_DocumentFolder =
s_mj10777_Folder+s_DataSetNamespace+"\\";
///private int ip_EngineType = 5; // 5= Access
;ServerType=1 : OleDb
///private DataBase db_DataBase = null;
///
///public FormMainFrame()
///{
/// InitializeComponent();
/// i_Language = 1; // Call Method to create
sa_CreateTables, if needed
/// db_DataBase = new
DataBase(s_DocumentFolder,s_DataSetNamespace,ip_EngineType,1,ip_Language);
To create an Access Database form a DataSet do the following :
mj10777.DataBase.DataBase db_Table= new
mj10777.DataBase.DataBase(s_DocumentFolder,dset_MainFrame.Namespace,ip_Engin
eType,ip_ServerType,ip_Language);
db_Table.OnCreateDBfromDataSet(dset_MainFrame,true);
The Class takes care of all Connections strings, but there is not
User/Password support yet.
Both .dll's are include in the source of my DataBase class on :
http://www.codeproject.com/useritems/NetDbExplorer.asp
There is a help file include where everything is documented.
Hope this helps
Mark Johnson, Berlin Germany
(e-mail address removed)