using mysql

I

illusion.admins

I am using a MySQL database for the backend of an application I am
building. The database is built and ready to be plugged into the
application, BUT i am not really sure how to go about this. I am using
the MySQL.Data.MySQLClient using statement. I have been able to
successfully use the MySqlConnection class to connect to the database
and then MySqlCommand to create statements. One problem is (and if I
think I get my hands around this the rest of the calls will make
sense) I have table with three fields, lets call them A, B, and C. A
is a unique ID while B and C are user generated/entered information.
A,B, and C all need to be loaded into ?string arrays? in the program
so B can be compared to a certain value in the program. If this value
in the program matches any value in B then A and C are related to B.
Basically this module of the program is a login module just not sure
how to make the MySQL work with it.

Any help would be great!

Thanks
 
A

Adam Benson

Well first of all, I would consider using SQL Server Express rather than
MySQL : http://www.microsoft.com/sql/editions/express/default.mspx

I had to perform an investigation into MySQL a while ago for a project I was
working on and couldn't see any advantages to it. If cost is an issue use
SQL Server Express rather than MySQL. If cost is not an issue and you're
after a good database use SQL Server.

That said, your comment doesn't really make clear where your program fails.
Is it in a call to MySQL? Or is it after that when you're trying to do
something with the data? Also, if you're trying to log somebody in wouldn't
you just match on their logon id and pull the password etc from the
database? Surely you'd only need one row for that not the whole table?

One thing I did note down from my investigation was that MySQL didn't seem
to cope with compound statements :
"MySQL cannot cope with compound statements which makes programming for it
more tedious. i.e. DELETE FROM database WHERE (field = 'field to delete');
INSERT INTO database ." would be accepted by SQL Server, but not by MySQL.
It would have to be split into 2 separate statements. One for the delete,
and one for the insertion"

- Adam.
 
A

Arne Vajhøj

Adam said:
Well first of all, I would consider using SQL Server Express rather than
MySQL : http://www.microsoft.com/sql/editions/express/default.mspx

I had to perform an investigation into MySQL a while ago for a project I was
working on and couldn't see any advantages to it. If cost is an issue use
SQL Server Express rather than MySQL. If cost is not an issue and you're
after a good database use SQL Server.

You seem to forget one category: cost is an issue and they need a
big database.

SQLServer Express has limitations - 1 CPU 1 GB RAM 4 GB data may
not have been an issue for your usage, but it can be for other.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top