FHM786
Starting Member
1 Post |
Posted - 2009-01-06 : 02:53:14
|
Im getting the error Must declare the scalar variable "@AbsSurveyId"Please helpProtected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim conNorthwind As SqlConnection Dim strInsert As String Dim cmdInsert As SqlCommand conNorthwind = New SqlConnection("Server=XXXXXXX;database=XXXXXXXXXX;Integrated Security=True") strInsert = "INSERT INTO AbsSurvey(AbsSurveyId, EmpName, EmpRegion, EmpDept, DeptWorkforce, AvgDaysLost, CostMonitored, DirectCost, Trend, Distinguished, Illness, Family, Personal, Stress, Entitlement, OtherReasons, OtherDesc, ChangeUser, ChangeDate) VALUES (@AbsSurveyId, @EmpName, @EmpRegion, @EmpDept, @DeptWorkforce, @AvgDaysLost, @CostMonitored, @DirectCost, @Trend, @Distinguished, @Illness, @Family, @Personal, @Stress, @Entitlement, @OtherReasons, @OtherDesc, @ChangeUser, @ChangeDate)" cmdInsert = New SqlCommand(strInsert, conNorthwind) conNorthwind.Open() cmdInsert.ExecuteNonQuery() conNorthwind.Close() End SubFahèém Suleman |
|