C#/VS and Access Data Engine?  
Author Message
blanketsmith





PostPosted: Tue Jan 06 00:40:40 CST 2004 Top

Visual C#.Net >> C#/VS and Access Data Engine? Is the Access Data Engine part of the VS/.net install.

Eg. I need to write a stand alone Form app for which a small DB would
be helpful. IN VB 6, I would use ADO to call the Access engine. I
know that OLE is part of C# v1.1,but does MS ship the single engine as
part of the install? If not, can I download it and install it? If
yes, what am I looking for on the MS web site?

Thanks

DotNet361  
 
 
WoodBeeProgrammer





PostPosted: Tue Jan 06 00:40:40 CST 2004 Top

Visual C#.Net >> C#/VS and Access Data Engine? I've had it recommended to use the MSDE, you might look that up. I posted
recently a question about whether there are pitfalls in using MSDE in a
small app like that but so far no takers on the question!!


"David" <EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...
> Is the Access Data Engine part of the VS/.net install.
>
> Eg. I need to write a stand alone Form app for which a small DB would
> be helpful. IN VB 6, I would use ADO to call the Access engine. I
> know that OLE is part of C# v1.1,but does MS ship the single engine as
> part of the install? If not, can I download it and install it? If
> yes, what am I looking for on the MS web site?
>
> Thanks
>


 
 
Mark





PostPosted: Tue Jan 06 01:42:56 CST 2004 Top

Visual C#.Net >> C#/VS and Access Data Engine? 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
EMail@HideDomain.com

"David" <EMail@HideDomain.com> schrieb im Newsbeitrag
news:EMail@HideDomain.com...
> Is the Access Data Engine part of the VS/.net install.
>
> Eg. I need to write a stand alone Form app for which a small DB would
> be helpful. IN VB 6, I would use ADO to call the Access engine. I
> know that OLE is part of C# v1.1,but does MS ship the single engine as
> part of the install? If not, can I download it and install it? If
> yes, what am I looking for on the MS web site?
>
> Thanks
>


 
 
Mark





PostPosted: Tue Jan 06 01:47:37 CST 2004 Top

Visual C#.Net >> C#/VS and Access Data Engine? Sorry forgot one line in the reading code :

mj10777.DataBase.DataBase db_Table= new
mj10777.DataBase.DataBase(s_DocumentFolder,s_DataSetName,ip_EngineType,ip_Se
rverType,ip_Language);
dset_MainFrame = db_Table.OnReadDBtoDataSet();
dtable_MainFrame00 = dset_MainFrame.Tables[0];

Mark Johnson, Berlin Germany
EMail@HideDomain.com


"Mark Johnson" <EMail@HideDomain.com> schrieb im Newsbeitrag
news:3ffa6706$0$17557$EMail@HideDomain.com...
> 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
> EMail@HideDomain.com
>
> "David" <EMail@HideDomain.com> schrieb im Newsbeitrag
> news:EMail@HideDomain.com...
> > Is the Access Data Engine part of the VS/.net install.
> >
> > Eg. I need to write a stand alone Form app for which a small DB would
> > be helpful. IN VB 6, I would use ADO to call the Access engine. I
> > know that OLE is part of C# v1.1,but does MS ship the single engine as
> > part of the install? If not, can I download it and install it? If
> > yes, what am I looking for on the MS web site?
> >
> > Thanks
> >
>
>


 
 
David





PostPosted: Tue Jan 06 20:42:08 CST 2004 Top

Visual C#.Net >> C#/VS and Access Data Engine? Will look into this. May use Datasets and save into XML format.
Would like to use a database engine for this project.

Thanks


On Tue, 6 Jan 2004 08:42:56 +0100, "Mark Johnson" <EMail@HideDomain.com>
wrote:

>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

 
 
Mark





PostPosted: Wed Jan 07 02:07:28 CST 2004 Top

Visual C#.Net >> C#/VS and Access Data Engine? This would be the way to do this.

DB_DataSet.ReadXml(s_FileName);
DB_DataSet.WriteXml(s_FileName,XmlWriteMode.WriteSchema);

But I often recieved read errors on Compact, so I moved to SqlCe because of
this.

Mark Johnson, Berlin Germany
EMail@HideDomain.com

"David" <EMail@HideDomain.com> schrieb im Newsbeitrag
news:EMail@HideDomain.com...
> Will look into this. May use Datasets and save into XML format.
> Would like to use a database engine for this project.
>
> Thanks
>
>
> On Tue, 6 Jan 2004 08:42:56 +0100, "Mark Johnson" <EMail@HideDomain.com>
> wrote:
>
> >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
>