Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Protected Sub oInsert() '// define a connection to the database Dim cs As String = ConfigurationManager.ConnectionStrings("WhatEverNameYouWant").ConnectionString cs = cs.Replace("App_Data\GC.accdb", Server.MapPath("App_Data\GC.accdb")) Dim cn As New OleDbConnection(cs) Dim sFirstName As String sFirstName = "Test1" Dim sLastName As String sLastName = "Test2" Dim sEmail As String sEmail = "Test3" 'If sEmail <> "firstname.lastname@example.org" Then 'Me.TextBox3.Text = "#INVALID EMAIL#" 'Exit Sub 'End If Dim sSQL As String sSQL = "INSERT INTO Test ( [A], [B], [C] ) SELECT '" & sFirstName & "' AS Expr1, '" & sLastName & "' AS Expr2, '" & sEmail & "' AS Expr3" '// define the sql statement to execute Dim cmd As New OleDbCommand(sSQL, cn) Try '// open the connection cn.Open() '// execute the sql statement 'Using reader As OleDbDataReader = cmd.ExecuteReader(CommandBehavior.CloseConnection) ' While reader.Read() '// this loops through all of the returned records 'Response.Write("blah") 'End While 'GridView1.DataSource = reader 'GridView1.DataBind() 'End Using Catch ex As Exception Response.Write(ex.Message) Finally If cn.State <> ConnectionState.Closed Then cn.Close() End If End Try End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Get number of Files in Directory and Sub Directories||2||54|
How would you rewrite the string because it is too long? strSQL = Constants.txtUpdateStopVoi
|asp.net uploading picture to a temporary folder||4||25|