|
-
Apr 5th, 2010, 10:55 AM
#1
Thread Starter
Hyperactive Member
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:
-
Apr 5th, 2010, 11:04 AM
#2
Re: Establishing conn to database
Have you reported this to the folks that host the site?
-
Apr 5th, 2010, 11:07 AM
#3
Thread Starter
Hyperactive Member
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.
-
Apr 5th, 2010, 11:26 AM
#4
Thread Starter
Hyperactive Member
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?
-
Apr 5th, 2010, 11:37 AM
#5
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.
-
Apr 5th, 2010, 11:37 AM
#6
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
-
Apr 5th, 2010, 11:40 AM
#7
Re: Establishing conn to database
The picture is the standard SQL Server "connection failed" error message.
-
Apr 5th, 2010, 11:49 AM
#8
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
-
Apr 5th, 2010, 11:56 AM
#9
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
-
Apr 5th, 2010, 12:05 PM
#10
Thread Starter
Hyperactive Member
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.
-
Apr 5th, 2010, 12:07 PM
#11
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
-
Apr 5th, 2010, 12:10 PM
#12
Thread Starter
Hyperactive Member
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?
-
Apr 5th, 2010, 12:14 PM
#13
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
-
Apr 5th, 2010, 12:24 PM
#14
Thread Starter
Hyperactive Member
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
-
Apr 5th, 2010, 01:27 PM
#15
Thread Starter
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|