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
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. ToString();

ToString();

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpvisual-studiocomsysadminhelp
2 Posts 2 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.
  • G Offline
    G Offline
    gman44
    wrote on last edited by
    #1

    // I'm using Visual Studio C# and the 'EmailMessage' class. Here you see me attempting to retrieve data // from: newDataSet1 (dataset), Settings (table), SmtpServer (data column) and convert ToString (strSmtpServer)! // However what I have below retreives the DataColumn name and NOT the actual data (ie... smtp.yahoo.com). // I feel I'm so close is scarry... //Create the SMTP object using the constructor to specify the mail server string strSmtpServer = (newDataSet1.Settings.SmtpServerColumn.ToString()); SMTP smtpObj = new SMTP (strSmtpServer); //Send the message smtpObj.Send(msgObj); // Have mercy on this newbie and help...

    S 1 Reply Last reply
    0
    • G gman44

      // I'm using Visual Studio C# and the 'EmailMessage' class. Here you see me attempting to retrieve data // from: newDataSet1 (dataset), Settings (table), SmtpServer (data column) and convert ToString (strSmtpServer)! // However what I have below retreives the DataColumn name and NOT the actual data (ie... smtp.yahoo.com). // I feel I'm so close is scarry... //Create the SMTP object using the constructor to specify the mail server string strSmtpServer = (newDataSet1.Settings.SmtpServerColumn.ToString()); SMTP smtpObj = new SMTP (strSmtpServer); //Send the message smtpObj.Send(msgObj); // Have mercy on this newbie and help...

      S Offline
      S Offline
      srikkanthank
      wrote on last edited by
      #2

      I think your code only retrieving the column name. You need to access the rows instead of columns... string strSmtpServer = (newDataSet1.Settings.Rows(0)("SmtpServer).ToString()); The above code should work... Tell me it does.

      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