Click here to Skip to main content
15,928,404 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Help on Report Viewer Pin
pmarfleet9-Nov-07 3:09
pmarfleet9-Nov-07 3:09 
Questionhow to change the highlight color of a treeview? PinPopular
lee238-Nov-07 15:00
lee238-Nov-07 15:00 
QuestionVB Shell Folder error handler Pin
reegan418-Nov-07 10:39
reegan418-Nov-07 10:39 
AnswerRe: VB Shell Folder error handler Pin
Mycroft Holmes8-Nov-07 16:00
professionalMycroft Holmes8-Nov-07 16:00 
QuestionDelegate Question Pin
midnightshifting8-Nov-07 8:08
midnightshifting8-Nov-07 8:08 
AnswerRe: Delegate Question Pin
MidwestLimey8-Nov-07 8:52
professionalMidwestLimey8-Nov-07 8:52 
QuestionDeploying Com Wrapped DLL that has a webreference Pin
nlarson118-Nov-07 4:28
nlarson118-Nov-07 4:28 
Questionssh database connection in vb.net Pin
tj288-Nov-07 3:33
tj288-Nov-07 3:33 
Hi

I need to connect to a mysql Dbase on a unix server
using ssh in VB.net can anybody help as ive tried all I know I cant seem to get it right


can I get a sample with the response


Bellow is the code ive been using to try to connect

The proble is that the code connect but it does not go pass the con.open instead it gives an error that says Connection unexpectedly terminated


Public Function Plink_Start(ByVal Host As String, ByVal Username As String, ByVal Password As String, Optional ByVal Hidden As Boolean = True, Optional ByVal LocalPort As String = "3307", Optional ByVal RemoteHost As String = "localhost", Optional ByVal RemotePort As String = "3307") As Boolean


Plink.StartInfo.FileName = Application.StartupPath & "\plink.exe"
Plink.StartInfo.Arguments = "-ssh -l " & Username & " -pw " & Password & " -L " & LocalPort & ":" & RemoteHost & ":" & RemotePort & " -batch " & Host
If Hidden = True Then
Plink.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
End If

Try
Plink.Start()
Return True
Catch ex As Exception

MsgBox(ex.Message)
Return False

End Try
End Function


------------------------------------------------------------------------------------------------------------------------------------------



Public Function dbConnect() As MySqlConnection


'
Try
Plink_Start("xxx", "xxxxx", "xxxx", 1, " xxx ", "xxx", "22")


dbaseConn.ConnectionString = "server=xxxxxxx;" _
& "port=xxx;" _
& "uid=xxxx;" _
& "pwd=xxx;" _
& "database=xxx;" _
& "allow zero datetime=true"

Plink.Start()

If Plink.HasExited = False Then
dbaseConn.Open()
dbConnect = dbaseConn
Else
dbaseConn.Close()
dbConnect = dbaseConn
End If

Catch ex As MySqlException
dbaseConn.Close()
dbConnect = dbaseConn
End Try
End Function



im a junior developer at a company called securemail in south africa

QuestionNeed help to collect forest-wide group policy information. Pin
kingpin20058-Nov-07 3:16
kingpin20058-Nov-07 3:16 
QuestionA simpale Question Pin
half-life8-Nov-07 2:38
half-life8-Nov-07 2:38 
AnswerRe: A simpale Question Pin
AliAmjad8-Nov-07 2:43
AliAmjad8-Nov-07 2:43 
GeneralRe: A simpale Question Pin
half-life8-Nov-07 3:14
half-life8-Nov-07 3:14 
AnswerRe: A simpale Question Pin
Luc Pattyn8-Nov-07 3:00
sitebuilderLuc Pattyn8-Nov-07 3:00 
AnswerRe: A simpale Question Pin
MikeMarq8-Nov-07 4:37
MikeMarq8-Nov-07 4:37 
QuestionEPSON Printer Pin
briogene8-Nov-07 2:25
briogene8-Nov-07 2:25 
Questionquestion with chklistbox Pin
eyes20078-Nov-07 1:48
eyes20078-Nov-07 1:48 
AnswerRe: question with chklistbox Pin
AliAmjad8-Nov-07 1:54
AliAmjad8-Nov-07 1:54 
GeneralRe: question with chklistbox Pin
eyes20078-Nov-07 2:16
eyes20078-Nov-07 2:16 
GeneralRe: question with chklistbox Pin
AliAmjad8-Nov-07 2:39
AliAmjad8-Nov-07 2:39 
QuestionPassing pointer to structure from VB.net to VC++ Pin
naaas8-Nov-07 1:19
naaas8-Nov-07 1:19 
QuestionHow to make the system sleep for a while. Pin
SekharOne7-Nov-07 22:29
SekharOne7-Nov-07 22:29 
AnswerRe: How to make the system sleep for a while. Pin
RichardBerry7-Nov-07 23:55
RichardBerry7-Nov-07 23:55 
QuestionTree view population Pin
briogene7-Nov-07 22:25
briogene7-Nov-07 22:25 
AnswerRe: Tree view population Pin
John_Adams9-Nov-07 23:51
John_Adams9-Nov-07 23:51 
QuestionNetwork/Internet - status - bytes/sent/received Pin
FeRtoll7-Nov-07 22:04
FeRtoll7-Nov-07 22:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.