Save dataset using Oledb Connection in VB.NET

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mafaisal
    New Member
    • Sep 2007
    • 142

    Save dataset using Oledb Connection in VB.NET

    Hello

    I am Using Vb.Net 2005 And Sql2005

    See This

    Code:
    Dim RsSave as new adodb.recordset
    RsSave.open "Select * From Table Where 1=2 ",Con,CursorTypeEnum.adOpenDynamic, LockTypeEnum.adLockOptimistic
    
    con.Begintrans
    
    RsSave.AddNew
    RsSave.Fields(0).Value = textbox1.text
    RsSave.Fields(1).Value = textbox2.text
    RsSave.Fields(2).Value = textbox3.text
    RsSave.Update
    
    Con.Commitrans
    This Just eg for saving to databse using Adodb connection And Recordset

    My Question is Hw to Save like this using Oledb Connection And Dataset

    I will Try for that but not getting

    Faisal
  • Dököll
    Recognized Expert Top Contributor
    • Nov 2006
    • 2379

    #2
    Originally posted by mafaisal
    Hello

    I am Using Vb.Net 2005 And Sql2005

    See This

    Code:
    Dim RsSave as new adodb.recordset
    RsSave.open "Select * From Table Where 1=2 ",Con,CursorTypeEnum.adOpenDynamic, LockTypeEnum.adLockOptimistic
    
    con.Begintrans
    
    RsSave.AddNew
    RsSave.Fields(0).Value = textbox1.text
    RsSave.Fields(1).Value = textbox2.text
    RsSave.Fields(2).Value = textbox3.text
    RsSave.Update
    
    Con.Commitrans
    This Just eg for saving to databse using Adodb connection And Recordset

    My Question is Hw to Save like this using Oledb Connection And Dataset

    I will Try for that but not getting

    Faisal
    Greetings, mafaisal!

    I took the liberty of modifying your title to see if you can get better hits that way; changed it from this 'Using Dataset in OledbConnection ' to the above.

    Secondly, I do believe you will get better support in VB.NET forum. Will send there; we aslo have and SQL forum, care to see what ideas you can pick up there also.

    Good luck with the project!

    Dököll

    Comment

    • lotus18
      Contributor
      • Nov 2007
      • 865

      #3
      Hi

      You need to import System.Data.Ole Db.

      Rey Sean

      Comment

      Working...