Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert Data
Message
From
20/04/2003 10:34:33
Larry Santos
Local Data System
Philippines
 
 
To
20/04/2003 06:29:14
General information
Forum:
ASP.NET
Category:
ADO.NET
Title:
Miscellaneous
Thread ID:
00779465
Message ID:
00779615
Views:
11
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
Map
View

Click here to load this message in the networking platform