468,283 Members | 1,982 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,283 developers. It's quick & easy.

Connection string to upload data from mysql to postgresql thru SSH

111 100+
HII all,

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
  1.  
  2.   ' code to update the data with required fields into the post gre data base 
  3.         Dim myPgrConnect As New NpgsqlConnection
  4.         Dim myPgrCommand As New NpgsqlCommand
  5.         Dim strSQL As String
  6.         Dim record As String
  7.         Dim intRowsAffected As Integer
  8.         Dim ds As New DataSet
  9.         Dim myTable As DataTable
  10.         Try
  11.             If Plink.HasExited = False Then
  12.  
  13. [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]
  14.  
  15. UNABLE TO WRITE THE DATA INTO THE TRANSPORT CONNECTION...
  16.  
  17. [ERROR].........>>>>myPgrConnect.Open()....................>>>>>[ERROR]
  18.  
  19.             End If
  20.             Catch ex As Exception
  21.             MessageBox.Show("Secure Shell is not connected", "Error Message...!!")
  22.             Return
  23.         Catch ex1 As System.NullReferenceException
  24.             MessageBox.Show("Error2: " + ex1.Message(), "Error Message...!!")
  25.             Return
  26.         End Try
  27.  
  28.         myTable = myData.Tables(0)
  29.         Dim myRow As DataRow
  30.  
  31.  
IF IM TRYING TO GIVE THE SERVER AS THE ONE OF SSH TEHN IM GETTING AN ERROR STATING THAT:

[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..
May 25 '07 #1
3 2719
kenobewan
4,871 Expert 4TB
Here is a site that may help:
Postgre SQL
May 25 '07 #2
rhepsi
111 100+
Here is a site that may help:
Postgre SQL

Thnx.....

hey i need to know how to confirm whether SSh is activated or not...??
May 28 '07 #3
rhepsi
111 100+
Hii all,


How to know whether the SSH Tunnelling is working frm mysql to postgresql correctly...???

im trying to connect frm mysql to postgresql through ssh from vb.net code.....

Expand|Select|Wrap|Line Numbers
  1.               myPgrConnect.ConnectionString = "Server=192.168.1.61; Port=5432; Database=dalitch_css; Userid=dalitch; Password=dfndev; Protocol=3; SSL=false; Pooling=true; MinPoolSize=1; MaxPoolSize=20; Encoding=UNICODE; Timeout=15; SslMode=Disable;"
  2. mypgrConnect.Open()
  3.  
  4.  
Im getting an error as:

Unable to write the data into the transport conenction.....



plz help..

thnx in advance

hepsi..
May 28 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by ninjamonkey | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.