473,405 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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 3005
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

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

Similar topics

3
by: Ted | last post by:
In WSAT, I get the following error when trying to set up my provider: Could not establish a connection to the database. If you have not yet created the SQL Server database, exit the Web Site...
0
by: rhepsi | last post by:
In vb.net 1.1, im trying to upload the data from mysql to the postgresql database.... Postgresql is linked with the SSL connection.. now in the connection string if im trying to give the host...
6
Cintury
by: Cintury | last post by:
Hi all, I've developed a mobile application for windows mobile 5.0 that has been in use for a while (1 year and a couple of months). It was developed in visual studios 2005 with a back-end sql...
3
by: ninjamonkey | last post by:
Hi all, I've developed a mobile application for windows mobile 5.0 that has been in use for a while (1 year and a couple of months). It was developed in visual studios 2005 with a back-end sql...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.