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. Database & SysAdmin
  3. Database
  4. basic question inserting data into a table

basic question inserting data into a table

Scheduled Pinned Locked Moved Database
databasequestioncsharpsql-server
3 Posts 3 Posters 0 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.
  • M Offline
    M Offline
    MikeMarq
    wrote on last edited by
    #1

    Ok, I know vb.net and I've used ms access before and I understand the basic concepts of what a recordset and cursor and other stuff are but I have never used ADO before to program a database and I need to learn. Specifically I am trying to use vb.net 2005 to program ms access 2007. I've opened the database and opened a recordset successfully. This is the code I used. Private ADOConnection As New ADODB.Connection 'the database Private rsGuest As New ADODB.Recordset 'the recordset 'code for opening the database and recordset ADOConnection.Open("provider=microsoft.ace.oledb.12.0;" & "Data Source=j:\junk.accdb") rsGuest.Open("Guest", ADOConnection, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockOptimistic) What I need to know is what is the syntax for adding data to a recordset. If someone could give me an example it would be very helpfull. Thanks in advance. Mike ps I have googled the hell out of this but every example I find is either a different version of access or vb, or is an example of using sql server, or it is an example of vba within access. In any case there seem to subtle incompatabilities that mean the examples never seem to work.

    B R 2 Replies Last reply
    0
    • M MikeMarq

      Ok, I know vb.net and I've used ms access before and I understand the basic concepts of what a recordset and cursor and other stuff are but I have never used ADO before to program a database and I need to learn. Specifically I am trying to use vb.net 2005 to program ms access 2007. I've opened the database and opened a recordset successfully. This is the code I used. Private ADOConnection As New ADODB.Connection 'the database Private rsGuest As New ADODB.Recordset 'the recordset 'code for opening the database and recordset ADOConnection.Open("provider=microsoft.ace.oledb.12.0;" & "Data Source=j:\junk.accdb") rsGuest.Open("Guest", ADOConnection, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockOptimistic) What I need to know is what is the syntax for adding data to a recordset. If someone could give me an example it would be very helpfull. Thanks in advance. Mike ps I have googled the hell out of this but every example I find is either a different version of access or vb, or is an example of using sql server, or it is an example of vba within access. In any case there seem to subtle incompatabilities that mean the examples never seem to work.

      B Offline
      B Offline
      Blue_Boy
      wrote on last edited by
      #2

      check this[^]


      I Love T-SQL

      1 Reply Last reply
      0
      • M MikeMarq

        Ok, I know vb.net and I've used ms access before and I understand the basic concepts of what a recordset and cursor and other stuff are but I have never used ADO before to program a database and I need to learn. Specifically I am trying to use vb.net 2005 to program ms access 2007. I've opened the database and opened a recordset successfully. This is the code I used. Private ADOConnection As New ADODB.Connection 'the database Private rsGuest As New ADODB.Recordset 'the recordset 'code for opening the database and recordset ADOConnection.Open("provider=microsoft.ace.oledb.12.0;" & "Data Source=j:\junk.accdb") rsGuest.Open("Guest", ADOConnection, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockOptimistic) What I need to know is what is the syntax for adding data to a recordset. If someone could give me an example it would be very helpfull. Thanks in advance. Mike ps I have googled the hell out of this but every example I find is either a different version of access or vb, or is an example of using sql server, or it is an example of vba within access. In any case there seem to subtle incompatabilities that mean the examples never seem to work.

        R Offline
        R Offline
        Rob Graham
        wrote on last edited by
        #3

        You really shouldn't be using ADODB from VB.Net. ADODB is an older COM technology and was replaced in .Net with the System.Data.Oledb namespace classes. Oledb uses Datasets, Datatables, DataReaders and DataAdapters rather than Recordsets. It performs better than ADODB and is easier to use, and is an integrated set of managed classes.

        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