Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. Urgent Help on C#~~

Urgent Help on C#~~

Scheduled Pinned Locked Moved Web Development
helpquestioncsharpdatabasetutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    momoo
    wrote on last edited by
    #1

    Hi everyone.. I'm currently doing a web application using C# which i'm unfamiliar with the prgram. I need urgent help~ My problem is that if i retrieve the database, how can i select, edit or delete the particulars from the database which i select? Anyone who know how to code it?? I have tried several times and it seem like is not right.. Your help is greatly appreciated.. Thankz.. =) Cheers!

    G B 2 Replies Last reply
    0
    • M momoo

      Hi everyone.. I'm currently doing a web application using C# which i'm unfamiliar with the prgram. I need urgent help~ My problem is that if i retrieve the database, how can i select, edit or delete the particulars from the database which i select? Anyone who know how to code it?? I have tried several times and it seem like is not right.. Your help is greatly appreciated.. Thankz.. =) Cheers!

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      Please don't double post. --- b { font-weight: normal; }

      1 Reply Last reply
      0
      • M momoo

        Hi everyone.. I'm currently doing a web application using C# which i'm unfamiliar with the prgram. I need urgent help~ My problem is that if i retrieve the database, how can i select, edit or delete the particulars from the database which i select? Anyone who know how to code it?? I have tried several times and it seem like is not right.. Your help is greatly appreciated.. Thankz.. =) Cheers!

        B Offline
        B Offline
        bhumber
        wrote on last edited by
        #3

        Good morning Write a method like the below to populate the form // could be global private string strErrorMsg = "Database error: " + exp.Message; try { SqlConnection conn = new SqlConnection(put your connection string hear); strSQL = "SELECT * FROM theNameOftheTable"; SqlCommand cmd = new SqlCommand(strSQL, conn); cmd.CommandType = CommandType.Text; SqlDataAdapter sda = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); sda.Fill(ds); // a method to display the information, is this a grid or form with textboxes? conn.Close(); cmd.Dispose(); conn.Dispose(); } catch { //some message about the error strErrorMsg; }

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups