ToString();
-
// 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...
-
// 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...
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.