Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: c# with mysql

  1. #1

    Default c# with mysql


    im having problem involving getting data from my mysql database server using c#..my database looks something like this
    ------ Col1------Col2 ---- Col3---- Col4-----Col5
    Row1--- 7------- 1------- 4------- 0------- 3

    i need to get the whole row..then sort the data from least to greatest then put the sorted data back to in database..can anyone please helptnx..

  2. #2
    wot?, select * from <table> where <condition> order by <columname>

  3. #3
    So which is the problem?
    Query, connection, data objects?

  4. #4
    my problem is how to connect and get the datas.. i have my sorting program already,the problem is i dont know how to ge the data in the database..im fairly new using c#..

  5. #5
    ive used ODBC with mysql before its under system.data.ODBC
    pwede pud basin system.data.sqlClient you need a connection string for mysql
    thats all

  6. #6

  7. #7
    actually i already have the mysql connector, wat i mean about connecting is the code, i dont know what to type in my code to connect to the db..

  8. #8
    Quote Originally Posted by shawn87chau View Post
    actually i already have the mysql connector, wat i mean about connecting is the code, i dont know what to type in my code to connect to the db..
    haya2x insik graduate man march. . .

  9. #9
    You better read tutorials or ebooks on MySql db handling using C#...

  10. #10

    Default try this..

    Code:
     public class DBManager
        {
          private string conString = 
          System.Configuration.ConfigurationManager.AppSettings["ConnectString"].ToString();
          private MySqlConnection DbConnection;
    
          public DBManager() 
            { 
          
            }
          
          public MySqlConnection GetConnection()
            {
                Console.WriteLine("getConnection");
    
                if (DbConnection == null)
                {
                  try
                  {
                    DbConnection = new MySqlConnection(conString);
                  }
                  catch (MySqlException me)
                  {
                    throw new DBManagerException(me.Message);
                  }
                  catch (InvalidOperationException ie)
                  {
                    throw new DBManagerException(ie.Message);
                  }
                  finally 
                  {
                    
                  }
                }
                return DbConnection;
            }
        }

  11.    Advertisement

Page 1 of 2 12 LastLast

Similar Threads

 
  1. Asp.Net Authorization & Authentication with MySQL
    By globalweb in forum Programming
    Replies: 1
    Last Post: 04-21-2015, 02:36 PM
  2. Replies: 0
    Last Post: 02-07-2013, 01:55 PM
  3. PHP with MySql experts
    By sogate in forum Programming
    Replies: 8
    Last Post: 01-05-2008, 07:53 AM
  4. help with mySQL please...
    By aridoasis in forum Websites & Multimedia
    Replies: 2
    Last Post: 10-12-2007, 05:15 PM
  5. help with mySQL please... updated
    By aridoasis in forum Programming
    Replies: 3
    Last Post: 10-11-2007, 06:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top