Click here to Skip to main content
15,886,362 members
Home / Discussions / C#
   

C#

 
AnswerRe: DockPanel Suite Pin
Henry Minute13-Jun-09 6:34
Henry Minute13-Jun-09 6:34 
GeneralRe: DockPanel Suite Pin
Rafone13-Jun-09 7:18
Rafone13-Jun-09 7:18 
Questioncannot load data from database to textbox in Visual c# 2008 Pin
Adekolurejo13-Jun-09 5:52
Adekolurejo13-Jun-09 5:52 
AnswerRe: cannot load data from database to textbox in Visual c# 2008 Pin
Henry Minute13-Jun-09 6:38
Henry Minute13-Jun-09 6:38 
QuestionRe: cannot load data from database to textbox in Visual c# 2008 Pin
Adekolurejo13-Jun-09 7:02
Adekolurejo13-Jun-09 7:02 
AnswerRe: cannot load data from database to textbox in Visual c# 2008 Pin
Dave Kreskowiak13-Jun-09 6:48
mveDave Kreskowiak13-Jun-09 6:48 
GeneralRe: cannot load data from database to textbox in Visual c# 2008 Pin
Adekolurejo13-Jun-09 7:23
Adekolurejo13-Jun-09 7:23 
AnswerRe: cannot load data from database to textbox in Visual c# 2008 Pin
alamree13-Jun-09 7:08
alamree13-Jun-09 7:08 
hi dude try this code
using system.data;
using system.data.sqlclient;


////then you have to connect to the databse using the sqlconnection

sqlconnection cn=new sqlconnection("server=.;user=sa;pwd=admin123;database=Kay_Nylon_Db");

//you can repace the . with the server name which the database loaded n it
but if the database on the same Pc just write . it means local or this pc

//then you need the sqlquery
//if you are using just the select query use this code
sqlDataAdapter da=new sqlDataAdapter("select * from Company_Info",cn);

//now you need to fill the data into Dataset

Dataset ds=new DataSet();

da.Fill(ds,"Company_Info");


//now you have the Data In the dataset and you can display it where ever you want

Console.WriteLine(ds.tables["Company_Info"].rows[0]["Company_Id"].ToString());

Console.WriteLine(ds.tables["Company_Info"].rows[0]["Company_Name"].ToString());

Console.WriteLine(ds.tables["Company_Info"].rows[0]["Company_Address_Line1"].ToString());

Console.WriteLine(ds.tables["Company_Info"].rows[0]["Company_Address_Line2"].ToString());

Console.WriteLine(ds.tables["Company_Info"].rows[0]["Fax"].ToString());

Console.WriteLine(ds.tables["Company_Info"].rows[0]["Email"].ToString());

///

try this code it's more easier and saving time
QuestionRe: cannot load data from database to textbox in Visual c# 2008 Pin
Adekolurejo13-Jun-09 7:25
Adekolurejo13-Jun-09 7:25 
Question[Message Deleted] Pin
hkjghkj113-Jun-09 5:46
hkjghkj113-Jun-09 5:46 
AnswerRe: Sound Delay Pin
Henry Minute13-Jun-09 6:40
Henry Minute13-Jun-09 6:40 
AnswerRe: Sound Delay Pin
Dave Kreskowiak13-Jun-09 6:45
mveDave Kreskowiak13-Jun-09 6:45 
AnswerRe: Sound Delay Pin
0x3c013-Jun-09 7:34
0x3c013-Jun-09 7:34 
Questiona question for OOP experts and Presentation/Business/DB Layer Pin
pierpaolo paparo13-Jun-09 4:14
pierpaolo paparo13-Jun-09 4:14 
AnswerRe: a question for OOP experts and Presentation/Business/DB Layer Pin
Colin Angus Mackay13-Jun-09 4:30
Colin Angus Mackay13-Jun-09 4:30 
GeneralRe: a question for OOP experts and Presentation/Business/DB Layer Pin
pierpaolo paparo14-Jun-09 0:27
pierpaolo paparo14-Jun-09 0:27 
QuestionGot an error -->An unhandled exception of type 'System.StackOverflowException' occurred in PROJECT pro.exe Pin
KIDYA13-Jun-09 2:34
KIDYA13-Jun-09 2:34 
AnswerRe: Got an error -->An unhandled exception of type 'System.StackOverflowException' occurred in PROJECT pro.exe Pin
Anthony Mushrow13-Jun-09 2:43
professionalAnthony Mushrow13-Jun-09 2:43 
GeneralRe: Got an error -->An unhandled exception of type 'System.StackOverflowException' occurred in PROJECT pro.exe Pin
Luc Pattyn13-Jun-09 3:00
sitebuilderLuc Pattyn13-Jun-09 3:00 
GeneralRe: Got an error -->An unhandled exception of type 'System.StackOverflowException' occurred in PROJECT pro.exe Pin
KIDYA13-Jun-09 18:17
KIDYA13-Jun-09 18:17 
AnswerRe: Got an error -->An unhandled exception of type 'System.StackOverflowException' occurred in PROJECT pro.exe Pin
Colin Angus Mackay13-Jun-09 3:35
Colin Angus Mackay13-Jun-09 3:35 
AnswerRe: Got an error -->An unhandled exception of type 'System.StackOverflowException' occurred in PROJECT pro.exe Pin
dybs13-Jun-09 5:11
dybs13-Jun-09 5:11 
Questionwhat is the use of Httphandlers Pin
Shaik Haneef13-Jun-09 1:32
Shaik Haneef13-Jun-09 1:32 
AnswerRe: what is the use of Httphandlers Pin
Manas Bhardwaj13-Jun-09 2:00
professionalManas Bhardwaj13-Jun-09 2:00 
AnswerRe: what is the use of Httphandlers Pin
Gary Stafford13-Jun-09 8:19
Gary Stafford13-Jun-09 8:19 

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.