473,748 Members | 10,058 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Connection string to upload data from mysql to postgresql thru SSH

111 New Member
HII all,

im doin a vb project (vs.net 2003)

im trying to uload the data from mysql (tbl_students) to postgresql (tbl_students_n ew) ...

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.NpgsqlE xception' 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 3021
kenobewan
4,871 Recognized Expert Specialist
Here is a site that may help:
Postgre SQL
May 25 '07 #2
rhepsi
111 New Member
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 New Member
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
13359
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 Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider. On Windows XP Pro, I am using MS Visual Studio 2005, and I am using the developer's edition of...
0
1012
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 as the one in the SSL, im getting an error: Unable to read the connection from the transport connection. ..... Dim myPgrConnect As New NpgsqlConnection("Server=localhost; Port=5432; Database=dalitch_css; User Id=dalitch;...
6
8163
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 server mobile ce database. Until recently I was synching everything thru a com port serial cable. The devices would connect to the computer thru activesync and are able to acquire an internet connection. The sync for the program occurs thru a website...
3
2106
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 server mobile ce database. Until recently I was synching everything thru a com port serial cable. The devices would connect to the computer thru activesync and are able to acquire an internet connection. The sync for the program occurs thru a...
0
8984
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9530
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9363
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9238
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4593
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2206
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.