Im doin a project where im trying to update the records tht r present in mysql db to postgresql db...
Nw inorder to carry out the information... we r using SSH...
When im trying to execute the project...
it is giving SSH not connected
or
No Connection could be made because the target machine actively refused it.
the foll is the code for upload_button click:
code to update the data with required fields into the post gre data base
- Dim myPgrConnect As New NpgsqlConnection
-
Dim myPgrCommand As New NpgsqlCommand
-
'myCon.ConnectionString = "Server=xxx; Port=xx; Database=xx; Userid=xx; password=xxx; Protocol=xxxx; SSL=xxxx; Pooling=xx; MinPoolSize=xx; MaxPoolSize=xx; Encoding=xxx; Timeout=xx; SslMode=xx;"
-
Dim strSQL As String
-
Dim record As String
-
Dim intRowsAffected As Integer
-
Dim ds As New DataSet
-
Dim myTable As DataTable
-
-
-
-
-
Try
-
If Plink.HasExited = False Then
-
myPgrConnect.ConnectionString = "Server=xxx; Port=xx Database=xx; Userid=xx; Password=xxx; Protocol=x; SSL=xx; Pooling=xx; MinPoolSize=x; MaxPoolSize=xx; Encoding=xxx; Timeout=xx; SslMode=xxx;"
-
myPgrConnect.Open()
-
End If
-
Catch ex As Exception
-
MessageBox.Show("Secure Shell is not connected", "Error Message...!!")
-
Return
-
Catch ex1 As System.NullReferenceException
-
MessageBox.Show("Error2: " + ex1.Message(), "Error Message...!!")
-
Return
-
End Try
Are you trying to update a record in a database? You need to be more specific, probably posting code would be best so we can see what you are doing.