mysql odbc query

rahulsk1947 <[email protected]>
Newsgroups gmane.comp.db.mysql.odbc
Message-ID <[email protected]>
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)";
        
**##@#$#@*  - 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#a8402880
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/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.