Hii all,
im doin a vb 1.1 vs.net 2003 project where im trying to update the data from mysql to postgreSQL....
when im trying to click on update , im opening the connection of PostgreSQL using SSH(secure shell) -
Dim myPgrConnect As New NpgsqlConnection("Server=localhost; Port=8443; Database=dalitch_css; User Id=dalitch; Password=dfndev; Timeout=30")
-
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
-
-
myPgrConnect.Open()..........>> Here im getting a error stating that
-
An unhandled exception of type 'System.IO.IOEx ception' occurred in npgsql.dll
Additional information: Unable to read data from the transport connection.
plz help.....
regards
ruth
3 7794 michaelb 534
Recognized Expert Contributor
You said "... opening the connection of PostgreSQL using SSH(secure shell)"
This suggests that database server is installed on a remote machine.
At the same time you coded "Server=localho st;"
I am not familiar with the VB/npgsql API, but this is the first thing I would check on. While at it verify that dbname, port# and everything else in the connect string is correct.
Also make sure that your version of npgsql is compatible with your version of Postgres.
(I think the latest Frontend/Backend Protocol is now up to version 3)
There's also a chance that this is a bug in npgsql, similar cases have been reported: http://gborg.postgresql.org/project/...pdate.php?1418
You said "... opening the connection of PostgreSQL using SSH(secure shell)"
This suggests that database server is installed on a remote machine.
At the same time you coded "Server=localho st;"
I am not familiar with the VB/npgsql API, but this is the first thing I would check on.
Also make sure that your version of npgsql is compatible with your version of Postgres.
(I think the latest Frontend/Backend Protocol is now up to version 3)
Thnq for ur reply....
hey ure right... -
' 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
-
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;"
-
myPgrConnect.Open()
-
End If
-
Catch ex As Exception
-
MsgBox("Error" + ex.Message(), MsgBoxStyle.Information, "error")
-
-
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
-
-
'For Each myRow In mytable.Rows
-
' strSQL = "UPDATE ""Tbl_Students"" SET " _
-
' & " ""ST_FirstName"" = @ST_FirstName," _
-
' & " ""ST_DateofBirth"" = @ST_DateofBirth, " _
-
' & " ""ST_Gender"" = @ST_Gender, " _
-
michaelb 534
Recognized Expert Contributor
I'm glad it worked for you.
Please make sure to use the correct format (especially CODE TAGS) in your next posting.
The Posting Guidelines at the top of the forum will give you more information.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: LRW |
last post by:
I'm sorry, I don't know if this is a mySQL issue, or a Putty error, or
what. So if there's a better newsgroup for this question, please let
me know.
I'm using Putty to SSH into our remote Linux server. On one of our
mySQL databases, we have a table of users. One of the fields used to
store passwords we have as type "BLOG" and we use the ENCODE/DECODE to
encrypt passwords.
Now, when we do a select of a row from that table, because the
|
by: N.K. |
last post by:
Hi, I've just installed postgres on the Linux server. It is supposed
to start automatically which I think it does since I can run an sql
stmt right away. When I'm trying to connect from a remote machine I
get a message that the remote machine IP address is not specified in
pg_hba.conf, that there is no record of that machine there.
ph_hba.conf is set up correctly, because when I run the following:
postmaster -i -D /var/lib/pgsql/data...
|
by: jbi130 |
last post by:
I have a 3 tier client/server application where the client connection
to the server which then uses PostgreSQL. I'd like to extend the
client to have direct access to PostgreSQL but do not want to open up
postgresql to the internet.
So, I'd like to tunnel the libpq connection over the existing secure
socket. My preferred solution would be for the client to pass libpq
an already connected file descriptor (so I can prevent binding a port...
|
by: Morten Wennevik |
last post by:
I made a program than can send text to Putty (A telnet/ssh client)
http://www.chiark.greenend.org.uk/~sgtatham/putty/
And I discovered that Unicode characters doesn't reach it
I'm using PostMessage with WM_CHAR, the text source is taken straight
from a textbox and sent character by character to putty (putty handle is
previously found with FindWindow)
private void sendText(string text)
{
|
by: Alexander Cohen |
last post by:
Im trying to connect locally to a database on a running postgres
cluster. If i connect with psql, everything is fine and i can transact.
I i try and connect in my own app, i get this error:
Could not connect to server: permission denied.
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"
I know for a fact postgres is running, i can see with <ps> and also
<top> in the terminal on Mac OSX...
| |
by: Goutam Paruchuri |
last post by:
Hello,
I get an error in my log when connecting to postgres server on Windows.
Postgres version : 8.0.0-beta4
LOG TEXT
2004-11-10 11:22:47 LOG: invalid entry in file "C:/Program
Files/PostgreSQL/8.0.0-beta4/data/pg_hba.conf" at line 64, token
"192.168.2.1/254"
|
by: Ulysse |
last post by:
Hello,
I have a python script which runs all the time (using of library
threading). I would like this scipt to run on a remote linux Os using
Putty. The problem is, when I close Putty command line window running
on my Win PC, the python script stops to run too.
I tried to use cron tables instead. By setting the time and restart
cron process, but it's not practical.
|
by: A3AN |
last post by:
Hi. I receive a database backup on a daily basis. I then import this dump on another server which I use for software development. There is two db's being hosted on this server. We test software upgrades against these two db's. The "refresh" needs to be completed at least once a day, sometimes 4-5 times a day. I need the quickest way of doing this task. I have extremely limited knowledge on scripting. What I need is something that I can just...
|
by: Pvt Ryan |
last post by:
Background:
Due to the large number of bots attempting to ssh to my server, I
implemented portknocking (as the logs were just filled with crap).
So to access port 2222 for ssh I would first need to connect on port
3333 which opens port 2222 for 60secs.
(obv I just made those ports up)
I wanted to continue to use putty under windows to connect to my
|
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...
|
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...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
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...
| |