add delete records

asp.net United States
  • 18 years ago

    dear ppl
    pls help me add and delete records from access database in asp.net using vs.net framework.
    i only hav 1 week b4 deadline.pla help

  • 18 years ago

    dewi you need to learn ado.net to do this and it's a big subject. You can add/delete records using just a command object or a dataadapter which is more complicated. Unfortunately posting here and asking somebody to write a book for you in a week is a bit hopeful. In any case here's an example:-


    dim conn as SqlConnection
    dim cmd as SqlCommand
    dim sql as string
    conn.connectionstring = [your connections string]
    sql = "insert into table (field1, field2) values (value1, value2)"


    try
       conn.open
       cmd.commandtext = sql
       cmd.executenonquery
    finally
       conn.close
    end try


    My point being if this code raises more questions then a week won't be enough for you to figure this stuff out.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The question of whether computers can think is just like the question of whether submarines can swim.” - Edsger W. Dijkstra