[Mono-list] Creating a simple apps that connect to Mysql
Daniel Morgan
danmorg@sc.rr.com
Fri, 1 Nov 2002 13:21:41 -0500
In mcs/class/Mono.Data.MySql/Test you will find some little test programs.
For build MySqlTest.cs on Windows, do:
$ mono c:/cygwin/home/danmorg/mono/install/bin/mcs.exe MySqlTest.cs -r
System.Data.dll -r Mono.Data.MySql.dll
To run it:
$ mono MySqlTest.exe
Of course, you probably have to modify MySqlTest.cs to suit your needs, for
example, the connection string:
...
public static void Main(string[] args) {
MySqlConnection dbconn = new MySqlConnection ();
string connectionString =
"dbname=test;";
dbconn.ConnectionString = connectionString;
dbconn.Open();
...
It has dbname for the Database, Host for the host, port for the port, etc...
The keywords: dbname, host, and others are not correct for ADO.NET
connection strings; however, they are something I threw in at haste. I
still need to change it so I connection string like this would work:
"Server=localhost;Data Source=test;User ID=mysql;Password="
For setting up MySQL, best to read the MySQL docs
http://www.mysql.com/documentation/mysql/bychapter/manual_Installing.html#In
stalling
For Mono, see http://www.go-mono.com/download
Oh, it really helps to know C# and .NET too. You can google for tutorials
on C# and stuff.
Remember: Mono is in heavy development right now, it is not ready for
production.
-----Original Message-----
From: mono-list-admin@ximian.com [mailto:mono-list-admin@ximian.com]On
Behalf Of Ariel Rios
Sent: Friday, November 01, 2002 1:51 PM
To: Mono-List
Cc: ravi@ximian.com
Subject: [Mono-list] Creating a simple apps that connect to Mysql
Hi guys,
I'm checking for my company whether mono is coming up as a good
alternative for developing part of our software.
I want to build a little application that can connect to a given Mysql
database and perform some basic quuerys both in C# and asp.
AFAIK, this can be done currently and I want someone to point me to some
documentation on how to setup and hack this little app. If there is no
such document if you can help me to set it I can write such document
cheers,
ariel
_______________________________________________
Mono-list maillist - Mono-list@ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list