Click here to Skip to main content
15,889,116 members
Home / Discussions / C#
   

C#

 
GeneralRe: Best way to generate bulk pdf reports from DB. Pin
Member 1133296924-Dec-14 2:53
Member 1133296924-Dec-14 2:53 
AnswerRe: Best way to generate bulk pdf reports from DB. Pin
OriginalGriff24-Dec-14 3:07
mveOriginalGriff24-Dec-14 3:07 
AnswerRe: Best way to generate bulk pdf reports from DB. Pin
jschell24-Dec-14 11:14
jschell24-Dec-14 11:14 
Questionhow to set font in raw text printing in vb Pin
Member 1040541424-Dec-14 0:02
Member 1040541424-Dec-14 0:02 
AnswerRe: how to set font in raw text printing in vb Pin
OriginalGriff24-Dec-14 0:37
mveOriginalGriff24-Dec-14 0:37 
GeneralRe: how to set font in raw text printing in vb Pin
Richard MacCutchan24-Dec-14 2:13
mveRichard MacCutchan24-Dec-14 2:13 
GeneralRe: how to set font in raw text printing in vb Pin
OriginalGriff24-Dec-14 2:31
mveOriginalGriff24-Dec-14 2:31 
QuestionDisplay Data In Text Box Based On ID Pin
Member 1086943723-Dec-14 19:28
Member 1086943723-Dec-14 19:28 
I have a area in my Project where i need to display a title and content in two text boxes. The Data base tables are:

ID | Title | Content

This is what I have so far, I know I am on the right track, I just cant figure out how to get each box to display based on the ID.
[CODE]
private void frmMain_Load(object sender, EventArgs e)
{
try
{
string connStr = ConfigurationManager.ConnectionStrings["sdcAssistDB"].ConnectionString;
OleDbConnection dbConn = new OleDbConnection(connStr);
dbConn.Open();
OleDbCommand dbCommand = new OleDbCommand();
dbCommand.Connection = dbConn;
string query = "select * from JobAid";
dbCommand.CommandText = query;
OleDbDataReader dbReader = dbCommand.ExecuteReader();
while (dbReader.Read())
{
txtTitle1.Text = (dbReader["Title"].ToString());
txtContent1.Text = (dbReader["Content"].ToString());
txtTitle2.Text = (dbReader["Title"].ToString());
txtContent2.Text = (dbReader["Content"].ToString());
}
dbConn.Close();
}
catch (Exception ex)
{
MessageBox.Show("Unable to Connect to Database" + Environment.NewLine + "SDC Assistant will now Close " +ex,
"Critical Database Error!",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
Application.Exit();
}
}


[/CODE]

Thank you in advance
Rab
AnswerRe: Display Data In Text Box Based On ID Pin
OriginalGriff23-Dec-14 21:09
mveOriginalGriff23-Dec-14 21:09 
GeneralHow to make the Util. in c# wok Pin
Member 890232823-Dec-14 8:20
Member 890232823-Dec-14 8:20 
GeneralRe: How to make the Util. in c# wok Pin
DaveAuld23-Dec-14 8:40
professionalDaveAuld23-Dec-14 8:40 
GeneralRe: How to make the Util. in c# wok Pin
Jörgen Andersson23-Dec-14 8:40
professionalJörgen Andersson23-Dec-14 8:40 
GeneralRe: How to make the Util. in c# wok Pin
Eddy Vluggen23-Dec-14 11:49
professionalEddy Vluggen23-Dec-14 11:49 
GeneralRe: How to make the Util. in c# wok Pin
OriginalGriff23-Dec-14 21:48
mveOriginalGriff23-Dec-14 21:48 
QuestionHelp with datagridview ... Pin
turbosupramk322-Dec-14 8:42
turbosupramk322-Dec-14 8:42 
SuggestionRe: Help with datagridview ... Pin
Richard MacCutchan22-Dec-14 20:43
mveRichard MacCutchan22-Dec-14 20:43 
AnswerRe: Help with datagridview ... Pin
Mycroft Holmes22-Dec-14 21:17
professionalMycroft Holmes22-Dec-14 21:17 
AnswerRe: Help with datagridview ... Pin
turbosupramk323-Dec-14 3:23
turbosupramk323-Dec-14 3:23 
GeneralRe: Help with datagridview ... Pin
Richard MacCutchan23-Dec-14 4:50
mveRichard MacCutchan23-Dec-14 4:50 
GeneralRe: Help with datagridview ... Pin
turbosupramk323-Dec-14 5:17
turbosupramk323-Dec-14 5:17 
GeneralRe: Help with datagridview ... Pin
Richard MacCutchan23-Dec-14 5:49
mveRichard MacCutchan23-Dec-14 5:49 
GeneralRe: Help with datagridview ... Pin
turbosupramk324-Dec-14 3:02
turbosupramk324-Dec-14 3:02 
GeneralRe: Help with datagridview ... Pin
Richard MacCutchan24-Dec-14 3:35
mveRichard MacCutchan24-Dec-14 3:35 
QuestionHow to save text from TextBox2 as UTF-16 (Unicode), and not as UTF-8 - C# Pin
Member 1041097221-Dec-14 20:29
Member 1041097221-Dec-14 20:29 
QuestionRe: How to save text from TextBox2 as UTF-16 (Unicode), and not as UTF-8 - C# Pin
Richard MacCutchan21-Dec-14 22:29
mveRichard MacCutchan21-Dec-14 22:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.