Hi Guys, I just want to ask you if you have any GOOD and EASY to understand Ms Access Tutorial. Since I am new in VB.Net, I would really want to know how to do that. I wish to have a tutorial how to ADD,EDIT,DELETE,VIEW

I hope you can give me some links. thank you so much guys! :D

Dani AI

Generated

Quick, practical notes to get ADD / EDIT / DELETE / VIEW working with an Access file from VB.Net — and to address ’s path concern while building on ’s suggestion.

Keep the DB as a separate file (not baked into the assembly) so it can be written to at runtime. Build your connection string from a runtime path (relative to the app folder or a user-writable folder such as AppData). Use the ACE provider for .accdb files and Jet for old .mdb files; if you use Jet be sure the app targets x86 on 64‑bit machines.

Example (VB.Net):

Dim dbPath = System.IO.Path.Combine(Application.StartupPath, "data", "mydb.accdb")
Dim connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & dbPath & ";Persist Security Info=False;"

' Insert (parameter order matters with OleDb "?" placeholders)
Using cn As New OleDb.OleDbConnection(connString)
  cn.Open()
  Using cmd As New OleDb.OleDbCommand("INSERT INTO Customers (Name,Email) VALUES (?,?)", cn)
    cmd.Parameters.AddWithValue("?", txtName.Text)
    cmd.Parameters.AddWithValue("?", txtEmail.Text)
    cmd.ExecuteNonQuery()
  End Using
End Using

' Read into grid
Dim dt As New DataTable()
Using cn As New OleDb.OleDbConnection(connString)
  Using da As New OleDb.OleDbDataAdapter("SELECT * FROM Customers", cn)
    da.Fill(dt)
  End Using
End Using
DataGridView1.DataSource = dt

Practical tips and caveats

  • Use parameterized queries (above) — with OleDb you should use ? placeholders and add parameters in the exact order.
  • Deployment: mark the .accdb/.mdb as Content and "Copy if newer" during development; for a real installer copy the DB to a writable location (AppData or CommonApplicationData) on first run.
  • Permissions & platform: Program Files is not writable; compile as x86 if you depend on Jet; ACE drivers may need installing for some target machines.
  • Scalability: Access is fine for single-user or small LAN apps. For heavier multiuser scenarios use SQL Server Express or SQLite.

These points address ’s concern about a hard-coded path and give a safe, repeatable pattern for CRUD in VB.Net.

Recommended Answers

All 4 Replies

Hi,

You can find a good tutorial how to use a Access database with VB.Net,

Hi,

You can find a good tutorial how to use a Access database with VB.Net,

hi, its a good tutorial though, but I think this type of program cannot be flexible since the database is connected to a path, that makes the program rely on one path only. what I mean is I am trying to make an application. Thank you!

Hi,

It's a tutorial, so you can make some changes.
For example, add your database file like an embedded resource and then when you create a setup your file will be added during setup.

okay I'll try this one out. thanks!

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.