Insert record

Results 1 to 2 of 2

Thread: Insert record

  1. #1
    Join Date
    Dec 1969

    Default Insert record

    I know we can use this way to insert a record (see below):<BR><BR>*********************************** ***************<BR>Dim MyCommand As SqlCommand<BR><BR>Dim InsertCmd As String = "insert into Authors (au_id)"<BR><BR>MyCommand = New SqlCommand(InsertCmd, MyConnection)<BR><BR>MyCommand.Parameters.Add(New SqlParameter("@Id", SqlDbType.NVarChar, 11))<BR><BR>MyCommand.Parameters("@Id").Value = au_id.Value<BR><BR>******************************* **********************<BR><BR>Is there any other way to insert a row of record where the database and table with fields are already available?<BR><BR>Thanks for helping.

  2. #2
    Join Date
    Dec 1969

    Default RE: Insert record

    you can use this command that will work over your last two lines<BR><BR>mycommand.parameters.add("@id",au_id. value).direction = parameterdirection.input<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts