|
-
Jan 9th, 2003, 05:07 AM
#1
Thread Starter
Lively Member
.Net connecting to a MS MDB File ? (Sorted)
Whats the best way in .Net to connect to an Access database ?
Last edited by OptimusPrime; Jan 10th, 2003 at 04:47 AM.
-
Jan 9th, 2003, 05:28 AM
#2
Registered User
It is through the OleDbConnection object.
Then you have 2 possibilities, either ADO in connected mode or ADO in disconnected MODE.
Connected mode uses a Command with a DataReader to read through the data in a fashion a lot like old ADO in vb6.
Disconnected mode fills a Dataset with information from a DataAdapter. You then can use the data in a disconnected fashion, ie add, remove, update rows as you like without roundabouts to the database. You later use the Update method of the DataAdapter to push all you updates made to the Dataset through.
There's alot more to this of course, but hopefully I got you on track...
-
Jan 9th, 2003, 05:32 AM
#3
Thread Starter
Lively Member
is it the same way i'd connect to a SQL Server Db ??
caus im usin ado @ the mo but my boss wanted me to check out MDB's ?? god knows why SQL server's much better
-
Jan 9th, 2003, 06:41 AM
#4
Registered User
There is a SQLConnection object a SQLDataAdapter and so on.... and they are much the same.
So if you use that its just to change into OleDb version of all objects and change the connectionstring to a JET one.
If that is the case I personally think SQL is better in most cases, but if you are using old ADO through com, I can only suggest that you change to either, as the difference between old ADO and ADO.NET is a lot greater that the difference between ADO.NET's SQL and OleDb variants.
-
Jan 9th, 2003, 03:36 PM
#5
Frenzied Member
This might prove helpful. ConnectionStrings.com
~Peter

-
Jan 10th, 2003, 04:45 AM
#6
Thread Starter
Lively Member
many thanks think i've got it sorted
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|