日期:2014-05-17 浏览次数:20379 次
Dim conn As SqlConnection Dim cmd As SqlCommand Dim cmdstring As String = "Insert Order (Name,Goods,_End,_Start,Number,Volume,BoxClass,Tel1,Tel2,Email,Company,Time) values('" & TextBox14.Text.ToString & "','" & TextBox18.Text.ToString & "','" & TextBox12.Text.ToString & "','" & TextBox11.Text.ToString & "','" & TextBox19.Text.ToString & "','" & TextBox8.Text.ToString & "','" & DropDownList3.SelectedValue.ToString & "','" & TextBox15.Text.ToString & "','" & TextBox17.Text.ToString & "','" & TextBox16.Text.ToString & "','" & TextBox13.Text.ToString & "','" & TextBox9.Text.ToString & "')" conn = New SqlConnection("Data source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True") cmd = New SqlCommand(cmdstring, conn) conn.Open() cmd.ExecuteNonQuery() conn.Close()