Dataset and MS Access

C

CypherDrive

Do you have VB.NET - MS Access Samples that Uses
a Dataset and Updates the MS Access Database. Also, how can we resolve the
ID Uniqueness in case there are
multiple users accessing and updating the same table?

Thanks Again
 
C

Cor Ligthert[MVP]

CypherDrive,

For handling a Jet DataBase and a SQL Server database with AdoNet there is
only one main difference.

You have to use the OleDB namespace instead of the SqlClient namespace.
In that is than in fact the main difference that SqlClient uses named
parameters, while OleDB uses those by sequence.

Cor
 
J

Jialiang Ge [MSFT]

Hello CypherDrive,

For your request of the examples to access Microsoft Access database with
VB.NET:

*Walkthrough: Editing an Access Database with ADO.NET*
http://msdn.microsoft.com/en-us/library/ms971485.aspx
This is a general introduction of Access database - ADO.NET (can be written
in VB.NET). However, this article directly uses SQL commands to update
database instead of a DataSet.

*ADO.NET: Update a Database from a DataSet*
http://asp.dotnetheaven.com/howto/doc/adoplus/UpdateDataFromDB.aspx
This introduces how to update a database from a DataSet. Although the demo
uses SQL Server database, as Cor said, the only difference between a Jet
DataBase and a SQL Server database with ADO.NET is we need to use the OleDB
namespace instead of the SqlClient namespace.

In order to resolve the ID Uniqueness in case there are multiple users
accessing and updating the same table, we may refer to the Data Concurrency
support in ADO.NET:
http://msdn.microsoft.com/en-us/library/cs6hb8k4(VS.80).aspx
By default Visual Studio creates these parameters for you if you select the
Optimistic Concurrency option in the DataAdapter Configuration Wizard. It
is up to you to add code to handle the errors based upon your own business
requirements. ADO.NET provides a DBConcurrencyException object that returns
the row that violates the concurrency rules.

Please let me know if you have any other concerns, or need anything else.

Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

Jialiang Ge [MSFT]

Hello CypherDrive,

I am writing to check the status of the issue on your side. Would you mind
letting me know the result of the suggestions? If you need further
assistance, feel free to let me know. I will be more than happy to be of
assistance.

Have a great day!

Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top