Results 1 to 15 of 15

Thread: Establishing conn to database

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2009
    Posts
    257

    Establishing conn to database

    Hello,

    I've ran into some problems already when trying to hook up my project to a database.

    The database is setup by the free MySQL database hosting site: http://www.db4free.net, but when i try and connect to it using the "New data connection" dialog it fails. Here are the details i'm entering:

    Server: db4free.net
    (Use SQL Authentication)
    Username: [dbusername]
    Password: [dbpassword]

    When I test the connection i get the following error:


  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Establishing conn to database

    Have you reported this to the folks that host the site?

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2009
    Posts
    257

    Re: Establishing conn to database

    Actually no, didn't think of that.

    I'll go duplicate this post on their forums and see what's up.

    Ty.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2009
    Posts
    257

    Re: Establishing conn to database

    Hmm something's up with their forum, can't register.

    I've had a thought though, instead of using SQL server as a central database and have to adapt my project to function according with SQL syntax, would it be possible to upload my Access database to my server and have that act as a central server. That way i'd only need to change the database host.

    Or would that not work?

  5. #5
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Establishing conn to database

    Using an Access database (or another file-based database system) on a web server is ridiculously tricky, and requires that the server is set up in a particular way... it is a much better idea to use a server based database system (such as MySQL/SQL Server/Oracle) instead, as they are designed for it.

    As to the original issue, it seems that you have a MySQL database, but are trying to connect to an SQL Server one. You can find info about how to connect to MySQL in our Database Development FAQs/Tutorials (at the top of the Database Development forum)

    If you still have problems, the next step to take is to look at db4free's site, as they have FAQs etc which are likely to contain the information you need.

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

    Re: Establishing conn to database

    I can't see the picture, so I'm not sure what the error says... but ... what edition of VB are you using? Are you using VB Express by chance?

    -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??? *

  7. #7
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Establishing conn to database

    The picture is the standard SQL Server "connection failed" error message.

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

    Re: Establishing conn to database

    The reason I ask is because the Express Editions can only connect to localhost in the database server explorer. It's one of the dirty secret limitations of the Express Edition.

    -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??? *

  9. #9
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: Establishing conn to database

    Since the website say MySQL why would the error message be saying SQL Server? Are you tring to use the SQL Client connector (for SQL Server) to Connect to a MySQL database server?
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2009
    Posts
    257

    Re: Establishing conn to database

    My VB ver is 2010 Pro so it doesn't have the DB limitations.

    And yeah, i'm using the SQLClient to try to connect to the DB. I guess that's not what im supposed to use. I'll take a look at the tutorials and see if I can work it out.

    Thanks all.

  11. #11
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: Establishing conn to database

    Definitly not what you should be using. You need the MySQL connector to connect to MySQL databases. And there is probably a version of objects for MySQL also since you can not use the SQLDatareader or its other parts
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

  12. #12

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2009
    Posts
    257

    Re: Establishing conn to database

    I've actually download the MySQL connector from the MySQL website but can't seem to find the reference to add it to the project. Any ideas?

  13. #13
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: Establishing conn to database

    Never used it.... I do know there are examples on this site for it though
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

  14. #14

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2009
    Posts
    257

    Re: Establishing conn to database

    Ah read them and realised you don't need to reference the class. I try it this way and see how it works out. Ty

  15. #15

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2009
    Posts
    257

    Re: Establishing conn to database

    I installed the .Net Connector as per the tutorial but the "MySQL Database" option in the data sources dialog is not theere?!?

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