Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert Data
Message
De
20/04/2003 06:29:14
 
 
À
19/04/2003 17:46:09
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Titre:
Divers
Thread ID:
00779465
Message ID:
00779594
Vues:
25
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform