Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 connect to server issue

Author  Topic 

ruler
Starting Member

2 Posts

Posted - 2008-03-13 : 09:31:57
hello first i hope i am posting in the right place and apologise if i am not.

first of all i am using MySQL client version: 5.0.45
operating system is XP pro x86
i host a webserver on my home machine and everything works fine, can connect to my own site from localhost and from the internet perfectly however i have another problem, i hope someone here can help me.

ive been learning VB and have created a small simple windows form app with a single button what when pressed will connect to my sql db eccept it wont connect i get a error message which can be seen here www.dchubad.com/error.jpg i cant figure it out.
i have asked on the MSDN forums and was told that maybe someone here might be able to help with just the connection probs to the server. any help would be much appreciated. thank you

EDIT: i have added also my full VB code below (if this might also help) maybe someone could see what i am doing wrong with my connection string. thanks

Imports System.Data.SqlClient

Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim myConnectionString As String = "server=127.0.0.1;uid=server;pwd=;database=dcphl;"
Dim myConnection As New SqlConnection(myConnectionString)
Dim myCommand As SqlCommand = myConnection.CreateCommand()
Try
myConnection.Open()
MsgBox("<Bot> SQL LOGIN SUCCESSFUL!")
Catch ex As SqlException
MsgBox(ex.Message)
Finally
myConnection.Close()
End Try
End Sub
End Class


newbie

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-03-13 : 13:07:34
For MySql, you'll need to post on a MySql forum as this one is for Microsoft SQL Server. Try the one over at dbforums.com

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

ruler
Starting Member

2 Posts

Posted - 2008-03-13 : 13:24:03
ah ok thanks for that info :)

newbie
Go to Top of Page
   

- Advertisement -