Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Creating a new row.

Creating a new row.

Scheduled Pinned Locked Moved Visual Basic
csharpdatabasetutorial
4 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    v450305
    wrote on last edited by
    #1

    Hi Please advise me how to enter a new row in Microsoft Access Database by using vb.net. regards adil

    _ 1 Reply Last reply
    0
    • V v450305

      Hi Please advise me how to enter a new row in Microsoft Access Database by using vb.net. regards adil

      _ Offline
      _ Offline
      _mubashir
      wrote on last edited by
      #2

      R u kidding asking such a question in this forum...You shud first search that into google or any other search engine, then try it yourself and if you are facing any problem then post it here so that we can help you out. We are not here for spoon feeding. please avoid such stuff in future. Mubashir

      Every job is a self portrait of the person who did it.

      V 1 Reply Last reply
      0
      • _ _mubashir

        R u kidding asking such a question in this forum...You shud first search that into google or any other search engine, then try it yourself and if you are facing any problem then post it here so that we can help you out. We are not here for spoon feeding. please avoid such stuff in future. Mubashir

        Every job is a self portrait of the person who did it.

        V Offline
        V Offline
        v450305
        wrote on last edited by
        #3

        hi dear I tried to find a lot ...as i am new to vb.net therefore suffering to solve my problem. I used following code to retrive data.. Now i want to insert...but unable to do so... Imports System.Data.OleDb Public Class Form1 Inherits System.Windows.Forms.Form Dim cn As OleDbConnection Dim cmd As OleDbCommand Dim dr As OleDbDataReader Private Sub Form1_Load(ByVal sender As System.Object, ByVal e as _ System.EventArgs) Handles MyBase.Load End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As_ System.EventArgs) Handles Button1.Click Try cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;_ Data Source=C:\emp.mdb;") 'provider to be used when working with access database cn.Open() cmd = New OleDbCommand("select * from table1", cn) dr = cmd.ExecuteReader While dr.Read() TextBox1.Text = dr(0) TextBox2.Text = dr(1) TextBox3.Text = dr(2) ' loading data into TextBoxes by column index End While Catch End Try dr.Close() cn.Close() End Sub End Class regards adil

        m.adil.farooq mcs & acca adil-farooq@maktoob.com

        G 1 Reply Last reply
        0
        • V v450305

          hi dear I tried to find a lot ...as i am new to vb.net therefore suffering to solve my problem. I used following code to retrive data.. Now i want to insert...but unable to do so... Imports System.Data.OleDb Public Class Form1 Inherits System.Windows.Forms.Form Dim cn As OleDbConnection Dim cmd As OleDbCommand Dim dr As OleDbDataReader Private Sub Form1_Load(ByVal sender As System.Object, ByVal e as _ System.EventArgs) Handles MyBase.Load End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As_ System.EventArgs) Handles Button1.Click Try cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;_ Data Source=C:\emp.mdb;") 'provider to be used when working with access database cn.Open() cmd = New OleDbCommand("select * from table1", cn) dr = cmd.ExecuteReader While dr.Read() TextBox1.Text = dr(0) TextBox2.Text = dr(1) TextBox3.Text = dr(2) ' loading data into TextBoxes by column index End While Catch End Try dr.Close() cn.Close() End Sub End Class regards adil

          m.adil.farooq mcs & acca adil-farooq@maktoob.com

          G Offline
          G Offline
          GoodID
          wrote on last edited by
          #4

          you can try to use dataset or oledbcommand with insert command and parameter to create new row

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups