Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!
'Open connection string and insert data into the ST database Dim ConnectionString As String Dim Connection As SqlConnection Dim Adapter As New SqlDataAdapter Dim sql As String ConnectionString = "Data Source=00.0.000.00;Initial Catalog=ST;User ID=user;pwd=pwd;" Connection = New SqlConnection(ConnectionString) sql = "insert into table (PBR_ID, Others_Details, Contact_Flag, Comments) VALUES (@PBRID, @Others, '" & ddlcontact.SelectedValue & "', @Comments);" Try Connection.Open() Adapter.InsertCommand = New SqlCommand(sql, Connection) Adapter.InsertCommand.Parameters.AddWithValue("@PBRID", tbpbrid.Text) Adapter.InsertCommand.Parameters.AddWithValue("@Others", tbneedsothers.Text) Adapter.InsertCommand.Parameters.AddWithValue("@Comments", tbcomments.Text) Adapter.InsertCommand.ExecuteNonQuery() Response.Write("<span style='color: green'>Data Submitted</span>") Catch ex As Exception Response.Write("<span style='color: red>Data Not Submitted</span>") End Try
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.