Click here to Skip to main content
15,899,825 members
Home / Discussions / C#
   

C#

 
GeneralRe: Redirecting winkey, alt+tab from ActiveX Rdp client Pin
f200254830-May-07 23:10
f200254830-May-07 23:10 
Questionhttphandlers and httphandlers Pin
vibhas198230-May-07 20:19
vibhas198230-May-07 20:19 
Questioncovert string[] to byte[] Pin
abdulsamad.shaik30-May-07 19:54
abdulsamad.shaik30-May-07 19:54 
AnswerRe: covert string[] to byte[] Pin
Christian Graus30-May-07 19:58
protectorChristian Graus30-May-07 19:58 
AnswerRe: covert string[] to byte[] Pin
Vikram A Punathambekar30-May-07 20:58
Vikram A Punathambekar30-May-07 20:58 
AnswerRe: covert string[] to byte[] Pin
Guffa30-May-07 21:26
Guffa30-May-07 21:26 
QuestionHow do I get InstanceId from EventId...? Pin
Rahul Joshi30-May-07 17:40
Rahul Joshi30-May-07 17:40 
QuestionPass connection in a function to another functions... Pin
Spiderk30-May-07 15:43
Spiderk30-May-07 15:43 
Hi... Sorry for my english...

I have this code...

<br />
<br />
// This function connects...<br />
public void Connect()<br />
{<br />
 NpgsqlConnection cnxPg = new NpgsqlConnection("Connection string...");<br />
 cnxPg.Open();<br />
}<br />
<br />
// This function have to make a sql select to the database...<br />
public void pgSelect(string strQry)<br />
{<br />
 if(cnxPg.State.ToString() == "Open") // I verify if the connection is open...<br />
 {<br />
   NpgsqlCommand npgComm = new NpgsCommand(strQry);<br />
 }<br />
}<br />


Ok... firs that all... that doesn't works Poke tongue | ;-P

Then i want to do something like this...

<br />
public void pgRow()<br />
{<br />
 // I have to get the query results to return the rows...<br />
}<br />


How can i return the connection to use it in other functions? How can i return the query results to uset it in other functions too?...

Did you understand me?... my english it's not so good, so i did my best...

Please help me Smile | :) Smile | :) Smile | :)

Thank you all Smile | :)
AnswerRe: Pass connection in a function to another functions... Pin
Christian Graus30-May-07 15:49
protectorChristian Graus30-May-07 15:49 
GeneralRe: Pass connection in a function to another functions... Pin
Spiderk30-May-07 15:57
Spiderk30-May-07 15:57 
GeneralRe: Pass connection in a function to another functions... Pin
Christian Graus30-May-07 16:37
protectorChristian Graus30-May-07 16:37 
QuestionProcess Lock Pin
convivial.developer30-May-07 14:44
convivial.developer30-May-07 14:44 
AnswerRe: Process Lock Pin
Luc Pattyn30-May-07 15:34
sitebuilderLuc Pattyn30-May-07 15:34 
QuestionA simple Question Pin
Michel Abi Khalil30-May-07 13:26
Michel Abi Khalil30-May-07 13:26 
AnswerRe: A simple Question Pin
Christian Graus30-May-07 15:50
protectorChristian Graus30-May-07 15:50 
AnswerRe: A simple Question Pin
Not Active30-May-07 17:02
mentorNot Active30-May-07 17:02 
Generaldecision matrix in C# Pin
amatbrewer30-May-07 11:25
amatbrewer30-May-07 11:25 
GeneralRe: decision matrix in C# Pin
Sean Michael Murphy30-May-07 15:11
Sean Michael Murphy30-May-07 15:11 
GeneralRe: decision matrix in C# Pin
amatbrewer31-May-07 4:45
amatbrewer31-May-07 4:45 
GeneralRe: decision matrix in C# Pin
Sean Michael Murphy31-May-07 4:56
Sean Michael Murphy31-May-07 4:56 
QuestionClosing Word Documents Pin
Copper2630-May-07 10:28
Copper2630-May-07 10:28 
AnswerRe: Closing Word Documents [modified] Pin
pnpfriend30-May-07 11:52
pnpfriend30-May-07 11:52 
GeneralRe: Closing Word Documents Pin
Copper2631-May-07 8:33
Copper2631-May-07 8:33 
AnswerRe: how can i remove the "pointer" of datagridview Pin
Not Active30-May-07 8:59
mentorNot Active30-May-07 8:59 
GeneralRe: how can i remove the "pointer" of datagridview Pin
FernandoMartin30-May-07 9:09
FernandoMartin30-May-07 9:09 

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.