im doin a vb project (vs.net 2003)
im trying to uload the data from mysql (tbl_students) to postgresql (tbl_students_new) ...
in the upload button_click:
connection string is as follows:-
Expand|Select|Wrap|Line Numbers
- ' code to update the data with required fields into the post gre data base
- Dim myPgrConnect As New NpgsqlConnection
- Dim myPgrCommand As New NpgsqlCommand
- 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
- [ERROR]........>>>> myPgrConnect.ConnectionString = "Server=localhost; Port=5432; Database=dalitch_css; Userid=dalitch; Password=dfndev; Protocol=3; SSL=true; Pooling=true; MinPoolSize=1; MaxPoolSize=20; Encoding=UNICODE; Timeout=15; SslMode=Enable;"...........>>>>>[ERROR]
- UNABLE TO WRITE THE DATA INTO THE TRANSPORT CONNECTION...
- [ERROR].........>>>>myPgrConnect.Open()....................>>>>>[ERROR]
- 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
- myTable = myData.Tables(0)
- Dim myRow As DataRow
[ERROR]
An unhandled exception of type 'Npgsql.NpgsqlException' occurred in npgsql.dll
Additional information: No connection could be made because the target machine actively refused it.
[/ERROR]
PLS REPLY...
THNQ
REGARDS
HEPSI..