Dim con As New SqlConnection Dim cmd As New SqlCommand("reg2") Dim Adapter As New SqlDataAdapter cmd.CommandType = CommandType.StoredProcedure Dim ds As New DataSet Dim dt As New DataTable 'Dim dr As SqlDataReader con.ConnectionString = "Server=.;Database=log;User Id=sa; Password=123;" cmd.Connection = con Adapter.SelectCommand = cmd ' dr = cmd.ExecuteReader cmd.Parameters.Add("@ID", SqlDbType.Int) cmd.Parameters("@ID").Value = TextID.Text cmd.Parameters.Add("@Name", SqlDbType.NVarChar) cmd.Parameters("@Name").Value = TextName.Text cmd.Parameters.Add("@sites", SqlDbType.VarChar) cmd.Parameters("@sites").Value = DropSites.Text cmd.Parameters.Add("@department", SqlDbType.NVarChar) cmd.Parameters("@department").Value = DropDep.Text cmd.Parameters.Add("@Nationalty", SqlDbType.NVarChar) cmd.Parameters("@Nationalty").Value = DropNat.Text cmd.Parameters.Add("@w", SqlDbType.VarChar) cmd.Parameters("@w").Value = 3 cmd.Parameters.Add("@Religions", SqlDbType.NVarChar) cmd.Parameters("@Religions").Value = DropRel.Text cmd.Parameters.Add("@Birth_Date", SqlDbType.NVarChar) cmd.Parameters("@Birth_Date").Value = TextBitrh.Text cmd.Parameters.Add("@hiring_date", SqlDbType.DateTime) cmd.Parameters("@hiring_date").Value = TextHiring.Text.ToString Session("LoadData") = ds.Tables("tabel1") con.Open() Adapter.Fill(ds, "tabel1") con.Close() loadgrid1()
sa
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)