Results 1 to 4 of 4

Thread: database and c#

  1. #1

    Thread Starter
    Lively Member angel of dark's Avatar
    Join Date
    Dec 2002
    Location
    Leon guanajuato Mexico
    Posts
    74

    database and c#

    Well Im traying to use C# for a final proyect in the school that will save the name of a client and other things in a database, but I don´t know how to do it, I found some pages that said that I need to use de SDK, but It wasnt to explisit, and they didn't explain way an how, so Im asking to all the people of the forum if yopu can help me to solve this, or how I con solv it?

    Thanks everyone
    al peor programador hasta el HELLO WORLD le marca error.....

    event to the worst programmer the Hello world marks him error..

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    You don't need SDK maybe you mean MSDE ?
    Here is some examples , look at them , try them , if you have any questions post here .http://www.c-sharpcorner.com/Database.asp

  3. #3

    Thread Starter
    Lively Member angel of dark's Avatar
    Join Date
    Dec 2002
    Location
    Leon guanajuato Mexico
    Posts
    74
    How can i do an update (using SQL) using ODBC, because I opened a conection and read from the .mdb but I can't do an update, By the way here is the example to read from a .mdb.

    // Build a connection and SQL strings
    string connectionString = @"Driver={Microsoft Access Driver (*.mdb)};DBQ=c:\Northwind.mdb";
    string SQL = "SELECT * FROM Orders";
    // Create connection object
    OdbcConnection conn = new OdbcConnection(connectionString);
    // Create command object
    OdbcCommand cmd = new OdbcCommand(SQL);
    cmd.Connection = conn;
    // Open connection
    conn.Open();
    // Call command's ExecuteReader
    OdbcDataReader reader = cmd.ExecuteReader();
    // Read the reader and display results on the console
    while (reader.Read())
    {
    MessageBox.show=(" \nOrderID:"+reader.GetInt32(0).ToString()+" , "+"Customer:" + reader.GetString(1).ToString() );

    PLEASE!!!! help me i cant update a table.....
    Cheers
    Last edited by angel of dark; May 17th, 2003 at 11:11 PM.
    al peor programador hasta el HELLO WORLD le marca error.....

    event to the worst programmer the Hello world marks him error..

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    The example you posted has nothing to do with updaing data . It reads data from database . anyways , try this link , it's all about ODBC database . http://www.superdotnet.com/show_refe...=All+Resources

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width