Page 1 of 1
Code sample for MS Access 2003?
Posted: Sun 25 Feb 2007 12:15
by marc15
I am currently evaluating UniDirect.NET with VS2005. My application is supposed to work with MS Access, SQLServer and Oracle. I am new to UniDirect and I can't find any sample for connecting to an Access 2003 database through OleDb. Has anyone done this before? Could you please post a code sample please?
Posted: Mon 26 Feb 2007 09:10
by Alexey
UniDirect is a .NET data provider and has nothing to do with OLE DB. It connects to MS Access using ADO.NET technology. If you are going to use OLE DB, you should consult appropriate documentation.
Code sample for MS Access 2003?
Posted: Mon 26 Feb 2007 10:02
by marc15
Alexey, thank you for your quick reply. I think I misunderstood the statement on the product page saying "The provider for MS Access enables data access to Microsoft Access data sources through OLE DB.". Nevertheless, do you happen to have some lines of code showing how to connect to an MS Access database through UniDirect?
Posted: Thu 01 Mar 2007 08:48
by Alexey
To be honest, UniDirect .NET uses standard ADO.NET OLE DB provider to connect to MS Access. The connection string looks as follows:
Code: Select all
provider=MS Access;Data Source=D:\Program Files\Common Files\Borland Shared\Data\dbdemos.mdb;
Posted: Fri 18 Sep 2009 16:32
by iddJoe
Alexey wrote:To be honest, UniDirect .NET uses standard ADO.NET OLE DB provider to connect to MS Access. The connection string looks as follows:
Code: Select all
provider=MS Access;Data Source=D:\Program Files\Common Files\Borland Shared\Data\dbdemos.mdb;
Could you also post an example of using the Access connection to, say, enter some data to a table?
Thanks!
Posted: Mon 21 Sep 2009 12:43
by Shalex
Here is a sample:
Code: Select all
UniConnection connection = new UniConnection(@"provider=MS Access;Data Source=D:\Program Files\Common Files\Borland Shared\Data\dbdemos.mdb;");
UniCommand cmd = new UniCommand("insert into table(a,b) values (1,1);", connection);
try {
connection.Open();
cmd.ExecuteNonQuery();
}
finally {
connection.Close();
}
Posted: Tue 22 Sep 2009 15:39
by Shalex
dotConnect Universal 3.0.1 Beta is available for download now.
It can be downloaded from
http://www.devart.com/dotconnect/unidir ... nload.html .
For more information, please refer to
http://www.devart.com/forums/viewtopic.php?t=15900 .