Click here to Skip to main content
14,843,569 members
Home / Discussions / C#
   

C#

 
GeneralRe: Total Upload , Download Internet Traffic Pin
Dave Kreskowiak12-Jun-09 12:46
mveDave Kreskowiak12-Jun-09 12:46 
AnswerRe: Total Upload , Download Internet Traffic Pin
I Believe In GOD12-Jun-09 12:24
MemberI Believe In GOD12-Jun-09 12:24 
QuestionReadig strings from a text file ? Pin
Jasmine Pomelo12-Jun-09 10:28
MemberJasmine Pomelo12-Jun-09 10:28 
QuestionRe: Readig strings from a text file ? Pin
led mike12-Jun-09 10:35
Memberled mike12-Jun-09 10:35 
AnswerRe: Readig strings from a text file ? Pin
Luc Pattyn12-Jun-09 10:46
sitebuilderLuc Pattyn12-Jun-09 10:46 
AnswerRe: Readig strings from a text file ? Pin
Josh Martin12-Jun-09 12:26
MemberJosh Martin12-Jun-09 12:26 
AnswerRe: Readig strings from a text file ? Pin
PIEBALDconsult12-Jun-09 13:23
professionalPIEBALDconsult12-Jun-09 13:23 
Questionhow can I get data from database and display in textbox Pin
Adekolurejo12-Jun-09 10:15
MemberAdekolurejo12-Jun-09 10:15 
I want the data stored in database to be displayed from the first record in the database. These data were submited to the database via textbox and I want to load the first record from database and display in the textbox.
below are the codes that I have check Beginners guide to accessing SQL Server through C# but can't still do it. No error but dont know what to do. Please I need help on this

Thanks
Ademola.


private void COMPANY_INFO_Load(object sender, EventArgs e)
{
SqlConnection myConnection = new SqlConnection("user id=sa;" +
"password=admin123;server=ADEMOLAPC;" +
"Trusted_Connection=yes;" +
"database=Kay_Nylon_Db; " +
"connection timeout=30");
myConnection.Open();
//try
//{
SqlDataReader myReader = null;
SqlCommand myCommand = new SqlCommand("select * from Company_Info", myConnection);

myReader = myCommand.ExecuteReader();
while (myReader.Read())
{

Console.WriteLine(myReader["Company_Id"].ToString());
Console.WriteLine(myReader["Company_Name"].ToString());
Console.WriteLine(myReader["Company_Address_Line1"].ToString());
Console.WriteLine(myReader["Company_Address_Line2"].ToString());
Console.WriteLine(myReader["Fax"].ToString());
Console.WriteLine(myReader["Email"].ToString());
}
AnswerRe: how can I get data from database and display in textbox Pin
Dave Kreskowiak12-Jun-09 11:23
mveDave Kreskowiak12-Jun-09 11:23 
QuestionRe: how can I get data from database and display in textbox Pin
Adekolurejo12-Jun-09 11:33
MemberAdekolurejo12-Jun-09 11:33 
AnswerRe: how can I get data from database and display in textbox Pin
Dave Kreskowiak12-Jun-09 12:42
mveDave Kreskowiak12-Jun-09 12:42 
AnswerRe: how can I get data from database and display in textbox Pin
Josh Martin12-Jun-09 12:36
MemberJosh Martin12-Jun-09 12:36 
AnswerRe: how can I get data from database and display in textbox Pin
DavidKiryazi12-Jun-09 13:35
MemberDavidKiryazi12-Jun-09 13:35 
AnswerRe: how can I get data from database and display in textbox Pin
ishandeb12-Sep-11 3:06
Memberishandeb12-Sep-11 3:06 
QuestionHow To Locate Form Pin
gal00012-Jun-09 9:57
Membergal00012-Jun-09 9:57 
AnswerRe: How To Locate Form Pin
Nagy Vilmos12-Jun-09 10:14
professionalNagy Vilmos12-Jun-09 10:14 
GeneralRe: How To Locate Form Pin
gal00012-Jun-09 10:17
Membergal00012-Jun-09 10:17 
GeneralRe: How To Locate Form Pin
Luc Pattyn12-Jun-09 10:28
sitebuilderLuc Pattyn12-Jun-09 10:28 
AnswerRe: How To Locate Form Pin
I Believe In GOD12-Jun-09 10:27
MemberI Believe In GOD12-Jun-09 10:27 
GeneralRe: How To Locate Form Pin
gal00012-Jun-09 10:34
Membergal00012-Jun-09 10:34 
Questionusing errorprovider control with C# form with checkboxes Pin
johnnysmith112-Jun-09 7:17
Memberjohnnysmith112-Jun-09 7:17 
AnswerRe: using errorprovider control with C# form with checkboxes Pin
OriginalGriff12-Jun-09 8:30
mveOriginalGriff12-Jun-09 8:30 
AnswerRe: using errorprovider control with C# form with checkboxes Pin
led mike12-Jun-09 8:34
Memberled mike12-Jun-09 8:34 
AnswerRe: using errorprovider control with C# form with checkboxes Pin
OriginalGriff12-Jun-09 8:45
mveOriginalGriff12-Jun-09 8:45 
GeneralRe: using errorprovider control with C# form with checkboxes Pin
johnnysmith112-Jun-09 9:38
Memberjohnnysmith112-Jun-09 9:38 

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.