insert record in sql server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • parag100
    New Member
    • Feb 2007
    • 13

    #1

    insert record in sql server

    hello
    there is a sinple data entry form in VB.NET.
    there r 5 text filds n labels.
    two buttons SAVE N EXIT
    USE DATAREADER.
    how i insert record in sql server table.
    assume i have connected coding on form load.
    what be on save button.
    table EMP
    filds :ename,empno,sa l,deptno,mgr.
    give coding
  • santuvssantu
    New Member
    • Jun 2007
    • 12

    #2
    Hi Parag,
    Explain us clearly what you need.We use Datareaders to get the data in connected mode.

    Dim myCommand As SqlCommand
    Dim strSql as String
    strSql = "Insert into EMP Values(" + <<UR text box values>> +")
    myCommand=New SqlCommand(strS ql)
    myCommand.Execu teNonQuery()

    Thanks.

    Comment

    Working...