I have writen a few DB programms in ADO.net now, and I hate it. It is riddle with confusion and problems, and because of the ridiculous idea of using all the data locally, it makes networking neigh on impossible and incredibly slow, so please please someone show me how to use DAO on dot net. All I want to know is:
how to make a connection
how to add a record
how to delete a record
and how to edit a record.
Just like in the good ol VB6 days.
UKnod
16
Newbie Poster
Recommended Answers
Jump to PostYou are not going to like this answer but don't use DAO. ADO is not confusing or riddled with problems. ADO is actually pretty straightforward. The only confusing part can be getting the connection string right and we can help you with that as long as we know what type …
Jump to PostOK Thanks for this, but I am using Access MDB.
All you have to change is the connection string. For access you might use
Driver={Microsoft Access Driver (*.mdb)};Dbq=d:\test\mydb.mdb;Uid=USERID;Pwd=PASSWORD;
If you don't require a userid or password just make them blank. Do you want to …
Jump to PostUsing ADO you can insert a new record by
Dim query As String = "INSERT INTO myTable (ID, LastName,FirstName) " _ & " VALUES(123,'Lightyear','Buzz')" con.Execute(query)
You should put these statements into a Try/Catch block so that you can detect failures. For example, if ID is the …
All 10 Replies
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
UKnod
16
Newbie Poster
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
UKnod
16
Newbie Poster
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
UKnod
16
Newbie Poster
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
UKnod
16
Newbie Poster
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
UKnod
16
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.