hi,
Can u make good or arrange ur code...I have a headache when i read ur code...
CYA
>Hi,
>
>First of all thanks for help
>
>I have tried following code but it did't work.
>it skip all line after
>.Fill(dsallmtrfitt,"A11mtrfitt").
>
>Try
> Dim SQLConn As SqlConnection
> Dim SQLDaMtrfitt As SqlDataAdapter
> Dim sqlCmdBldr As SqlCommandBuilder
> sqlCmdBldr = New SqlCommandBuilder(SQLDaMtrfitt)
> SQLDaMtrfitt = New SqlDataAdapter()
>
> With SQLDaMtrfitt
> .SelectCommand = New SqlCommand()
> With .SelectCommand
> .CommandType = CommandType.StoredProcedure
> .CommandText = "A11InsertMtrfitt"
> .Connection = New SqlConnection(ConnectionString)
> '.CommandType = CommandType.StoredProcedure
> '.CommandText = "A11InsertMtrfitt"
> .Parameters.Add("@empid", SqlDbType.Int, 4).Value =
>
>CType(CbEmpname.Items(CbEmpname.SelectedIndex), ListItem).ID
> .Parameters("@empid").Direction = ParameterDirection.Input
> .Parameters("@empid").SourceColumn = "A11empid"
>
> .Parameters.Add("@date", SqlDbType.DateTime, 8).Value = DtPicker1.Text
> .Parameters("@date").Direction = ParameterDirection.Input
> .Parameters("@date").SourceColumn = "A11date"
>
>
> .Parameters.Add("@hpphase1", SqlDbType.VarChar, 30)
> '.Parameters("@hpphase1").SourceColumn = LTrim(txtHpPhase1.Text)
>
> .Parameters.Add("@hpphase2", SqlDbType.VarChar, 30)
> '.Parameters("@hpphase2").SourceColumn = LTrim(txtHpPhase2.Text)
> .Parameters.Add("@hpphase3", SqlDbType.VarChar, 30)
> '.Parameters("@hpphase3").SourceColumn = LTrim(txtHpPhase3.Text)
>
> .Parameters.Add("@hpphase4", SqlDbType.VarChar, 30)
> '.Parameters("@hpphase4").SourceColumn = LTrim(txtHpPhase4.Text)
>
> .Parameters.Add("@type", SqlDbType.VarChar, 30)
> '.Parameters("@type").SourceColumn = LTrim(txtType.Text)
>
> .Parameters.Add("@total", SqlDbType.VarChar, 30)
> '.Parameters("@total").SourceColumn = LTrim(txtTotal.Text)
>
> .Parameters.Add("@others", SqlDbType.VarChar, 30)
> '.Parameters("@others").SourceColumn = LTrim(txtother.Text)
>
> .Parameters.Add("@Remarks", SqlDbType.VarBinary, 30)
> '.Parameters("@remarks").SourceColumn = LTrim(txtremarks.Text)
> .Connection = New SqlConnection(ConnectionString)
> End With
> .Connection.Open()
> dsa11mtrfitt.AcceptChanges()
> .Fill(dsa11mtrfitt, "A11MtrFitt")
> .Update(dsa11mtrfitt, "A11MtrFitt")
> .InsertCommand.Dispose()
> .InsertCommand.Connection.Close()
> ' End With
>
>Thanks in advance.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only