472,119 Members | 1,568 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

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

Nov 15 '05 #1
5 2804
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" <dbmartin5@-notused-comcast.net> wrote in message
news:jc********************************@4ax.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

Nov 15 '05 #2
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_En gineType,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_Ma inFrame.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
mj*****@mj10777.de

"David" <dbmartin5@-notused-comcast.net> schrieb im Newsbeitrag
news:jc********************************@4ax.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

Nov 15 '05 #3
Sorry forgot one line in the reading code :

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

Mark Johnson, Berlin Germany
mj*****@mj10777.de
"Mark Johnson" <mj*****@mj10777.de> schrieb im Newsbeitrag
news:3f***********************@newsread4.arcor-online.net...
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_En gineType,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_Ma inFrame.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
mj*****@mj10777.de

"David" <dbmartin5@-notused-comcast.net> schrieb im Newsbeitrag
news:jc********************************@4ax.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


Nov 15 '05 #4
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" <mj*****@mj10777.de>
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


Nov 15 '05 #5
This would be the way to do this.

DB_DataSet.ReadXml(s_FileName);
DB_DataSet.WriteXml(s_FileName,XmlWriteMode.WriteS chema);

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

Mark Johnson, Berlin Germany
mj*****@mj10777.de

"David" <db*******@notused.comcast.net> schrieb im Newsbeitrag
news:4c********************************@4ax.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" <mj*****@mj10777.de>
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

Nov 15 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

63 posts views Thread by Jerome | last post: by
1 post views Thread by Mike_red | last post: by
49 posts views Thread by Yannick Turgeon | last post: by
11 posts views Thread by Rosco | last post: by
12 posts views Thread by Earl Anderson | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.