hi!
                                                                 
there has to be a cast from object to string in order 
to put the value from reader["firstname"] into string 
FirstName. Same for sirname.
                                                                 
greets, josef
-- 
www: http://www.daemon.li
nic-hdl: JER1080312-NICAT
FreeBSD PortMaintainer 
Student of ComputerScience
--- mysql.orig  2003-03-01 23:02:09.000000000 +0100
+++ mysql       2003-03-01 23:02:36.000000000 +0100
@@ -190,8 +190,8 @@
        dbcmd.CommandText = sql;
        IDataReader reader = dbcmd.ExecuteReader();
        while(reader.Read()) {
-            string FirstName = reader["firstname"];
-            string LastName = reader["lastname"];
+            string FirstName = (string) reader["firstname"];
+            string LastName = (string) reader["lastname"];
             Console.WriteLine("Name: " + 
                   FirstName + " " + LastName);
        }

Reply via email to