Results 1 to 9 of 9

Thread: Connection String for Database on Internet

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    9

    Question 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
    Last edited by khawarqadri; Aug 26th, 2005 at 08:18 PM. Reason: More Detailed

  2. #2

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    9

    Re: Connection String Database on Net

    Please reply me soon

  3. #3
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    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.

  4. #4

  5. #5

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    9

    Re: Connection String Database on Net

    Thanks for the quick reply My database is MYSQL
    Last edited by khawarqadri; Aug 26th, 2005 at 08:19 PM.
    Spirit
    Potential
    Ability

  6. #6
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Connection String for Database on Internet

    The answer to all your connection problems.

    http://www.connectionstrings.com/

  7. #7
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    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
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  8. #8
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    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:
    1. Private Function ConnectString() As String
    2. Dim strServerName as String
    3. Dim strDatabaseName as string
    4. Dim strUserName as string
    5. Dim strPassword as string
    6.  
    7.     'Change to IP Address if not on local machine
    8.     'Make sure that you give permission to log into the
    9.     'server from this address
    10.     'See Adding New User Accounts to MySQL
    11.     'Make sure that you d/l and install the MySQL Connector/ODBC 3.51 Driver
    12.  
    13. strServerName = "192.168.xxx.xxx"
    14. strDatabaseName = "DatabaseName"
    15. strUserName = "UserName"
    16. strPassword ="Password"
    17.  
    18. ConnectString = "DRIVER={MySQL ODBC 3.51 Driver};" & _
    19.                 "SERVER=" & strServerName & _
    20.                 ";DATABASE=" & strDatabaseName & ";" & _
    21.                 "USER=" & strUserName & _
    22.                 ";PASSWORD=" & strPassword  & _
    23.                 ";OPTION=3;"
    24.  
    25. End Function

    See this link
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


  9. #9

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    9

    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.
    Spirit
    Potential
    Ability

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width