Click here to Skip to main content
15,880,608 members
Home / Discussions / C#
   

C#

 
GeneralExtending Visual Studio 2005 Pin
Strannick3-Apr-08 22:24
Strannick3-Apr-08 22:24 
GeneralRe: Extending Visual Studio 2005 Pin
Pete O'Hanlon3-Apr-08 23:07
mvePete O'Hanlon3-Apr-08 23:07 
GeneralPersist data in design-time/runtime Pin
LuKas23_3-Apr-08 22:10
LuKas23_3-Apr-08 22:10 
Generalpop client in c#, connect with gmail.com Pin
dift3-Apr-08 21:50
dift3-Apr-08 21:50 
GeneralRe: pop client in c#, connect with gmail.com Pin
ChrisKo4-Apr-08 4:16
ChrisKo4-Apr-08 4:16 
QuestionData Grid Pin
Member 45007023-Apr-08 21:06
Member 45007023-Apr-08 21:06 
GeneralRe: Data Grid Pin
pmarfleet3-Apr-08 21:45
pmarfleet3-Apr-08 21:45 
GeneralRe: Data Grid Pin
Rick van Woudenberg4-Apr-08 3:44
Rick van Woudenberg4-Apr-08 3:44 
I use a PostgreSQL database and this is the way I fill a datatable, and the parse the datatable to the gridview, assuming that it is called dtgview1.

try<br />
{<br />
NpgsqlConnection conn = new NpgsqlConnection("Server=" + server + ";" + "Port=" + port + ";" + "User Id=" + username + ";" + "Password=" + password + ";" + "Database=" + dbname + ";");<br />
DataTable dt = new DataTable();<br />
conn.Open();<br />
NpgsqlDataAdapter da = new NpgsqlDataAdapter("SELECT * from messages ORDER by mes_id", conn);<br />
da.Fill(dt);<br />
conn.Close();<br />
<br />
dtgview1.DataSource = dt;<br />
<br />
}<br />
catch(Exception ex)<br />
{<br />
  MessageBox.Show(ex.toString());<br />
  conn.Close();<br />
}


That's it Laugh | :laugh:
Questionhow can we get the call stack of target process Pin
sujithkumarsl3-Apr-08 20:50
sujithkumarsl3-Apr-08 20:50 
AnswerRe: how can we get the call stack of target process Pin
Pete O'Hanlon4-Apr-08 1:22
mvePete O'Hanlon4-Apr-08 1:22 
QuestionFTP Download trouble Pin
m1n1me3-Apr-08 20:24
m1n1me3-Apr-08 20:24 
GeneralRe: FTP Download trouble Pin
Sam Xavier24-Apr-08 21:11
Sam Xavier24-Apr-08 21:11 
QuestionUninitialized Object COM Exception Pin
bhavincpatel3-Apr-08 20:04
bhavincpatel3-Apr-08 20:04 
GeneralPerformance analysis Pin
sujithkumarsl3-Apr-08 19:54
sujithkumarsl3-Apr-08 19:54 
GeneralRe: Performance analysis Pin
Dave Kreskowiak4-Apr-08 5:39
mveDave Kreskowiak4-Apr-08 5:39 
Questioncreating Shortcut keys Pin
sumanshakya3-Apr-08 19:24
sumanshakya3-Apr-08 19:24 
GeneralRe: creating Shortcut keys Pin
rah_sin3-Apr-08 20:45
professionalrah_sin3-Apr-08 20:45 
GeneralRe: creating Shortcut keys Pin
N a v a n e e t h3-Apr-08 20:46
N a v a n e e t h3-Apr-08 20:46 
GeneralReportViewer: Printing only on odd pages Pin
Maddie from Dartford3-Apr-08 19:05
Maddie from Dartford3-Apr-08 19:05 
GeneralXbox controller Pin
meister_skypie3-Apr-08 19:03
meister_skypie3-Apr-08 19:03 
GeneralRe: Xbox controller Pin
MarkB7773-Apr-08 19:43
MarkB7773-Apr-08 19:43 
QuestionShould I use Crystal Report in this case? Pin
Faysal3-Apr-08 17:41
Faysal3-Apr-08 17:41 
GeneralRe: Should I use Crystal Report in this case? Pin
carbon_golem4-Apr-08 2:46
carbon_golem4-Apr-08 2:46 
GeneralKey Board hooks Pin
ASysSolvers3-Apr-08 17:23
ASysSolvers3-Apr-08 17:23 
GeneralRe: Key Board hooks Pin
Giorgi Dalakishvili3-Apr-08 22:33
mentorGiorgi Dalakishvili3-Apr-08 22:33 

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.