mysql odbc query
am 17.01.2007 04:04:54 von rahulsk1947hi, 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)";
**##@#$#@* - 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@m.gmane.org