Connection String for Database on Internet
Hi every body I have webspace and my database is saved is there. Now I want to access that database through my application which I have developed in VB 6.0 but don't what connection string I have to use. Or in simply I don't know anything about that weather it is possible or not.
Thanks :eek2: :rolleyes:
Re: Connection String Database on Net
Re: Connection String Database on Net
Welcome to the forums.
What kind of database is it? Access? SQL Server, or MySQL?
It is possible with each (although Access is not your best choice)
Each connection string would be different, though.
Re: Connection String Database on Net
For MS Access check link in my sig.
Re: Connection String Database on Net
Thanks for the quick reply My database is MYSQL
Re: Connection String for Database on Internet
The answer to all your connection problems.
http://www.connectionstrings.com/
Re: Connection String for Database on Internet
Who is the host? You may want to check with them first to see if they even allow remoting to the database. I know that my host doesn't allow me to. Which is good and bad... it's bad becauseI can't sue my loacl phpMyAdmin to login to it, but good because it forced me to upload phpMyAdmin so now I can get to it anywhere.
Also, your host may have the necessary info you'll need to connect to it remotely if they allow it.
Tg
Re: Connection String for Database on Internet
Here is a sample connection string that I use to connect to a MySQL DB accross our network, I am sure that you should be able to convert it for your needs:
VB Code:
Private Function ConnectString() As String
Dim strServerName as String
Dim strDatabaseName as string
Dim strUserName as string
Dim strPassword as string
'Change to IP Address if not on local machine
'Make sure that you give permission to log into the
'server from this address
'See Adding New User Accounts to MySQL
'Make sure that you d/l and install the MySQL Connector/ODBC 3.51 Driver
strServerName = "192.168.xxx.xxx"
strDatabaseName = "DatabaseName"
strUserName = "UserName"
strPassword ="Password"
ConnectString = "DRIVER={MySQL ODBC 3.51 Driver};" & _
"SERVER=" & strServerName & _
";DATABASE=" & strDatabaseName & ";" & _
"USER=" & strUserName & _
";PASSWORD=" & strPassword & _
";OPTION=3;"
End Function
See this link
Re: Connection String for Database on Internet
Thanks for all the replies. Today is sunday and holiday. I will check with my host and will come back for further assistance if needed.