mysql odbc query

hi, i am using mysql database and writing program in C#.i gota query
statement problem,maybe some1 can help.thanx

question 1)
//the code is below.

String empName;
OdbcCommand comm = new OdbcCommand("use employee", MyConnection); //use
employee database

Console.Write("Input name"); //input employee name
empName=Console.ReadLine();


comm.CommandText = "INSERT INTO employee (Name) values (empName)";

**## [at] #$# [at] * - how do i do that ? I want to get the user to input his name
and then be able to insert it into the database using the sQL insert comand
as above.



------------------------------

question 2)

I would like the user to input wat table he would like to use.any idea how
to do it?

Console.Write("Input table name"); //input employee name
tableName=Console.ReadLine();

OdbcCommand comm = new OdbcCommand(use tableName, MyConnection); //this
should use the name of the table the user specifies.


do let me know.thanx
--
View this message in context: http://www.nabble.com/mysql-odbc-query-tf3024740.html#a84028 80
Sent from the MySQL - ODBC mailing list archive at Nabble.com.


--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc [at] m.gmane.org
rahulsk1947 [ Mi, 17 Januar 2007 04:04 ] [ ID #1598505 ]
Datenbanken » gmane.comp.db.mysql.odbc » mysql odbc query

Vorheriges Thema: MySQL Connector/ODBC v5 5.00.10 Failure
Nächstes Thema: Connection to vc++