Click here to Skip to main content
16,004,833 members
Home / Discussions / C#
   

C#

 
GeneralRe: On Screen Keyboard Pin
PIEBALDconsult18-Feb-08 16:15
mvePIEBALDconsult18-Feb-08 16:15 
GeneralRe: On Screen Keyboard Pin
Jonathan Gibbs19-Feb-08 1:13
Jonathan Gibbs19-Feb-08 1:13 
GeneralEnding EXCEL.EXE process from C# and EXCEL COM interface. Pin
mjdesnoyer17-Feb-08 8:04
mjdesnoyer17-Feb-08 8:04 
GeneralRe: Ending EXCEL.EXE process from C# and EXCEL COM interface. Pin
Jimmanuel17-Feb-08 10:32
Jimmanuel17-Feb-08 10:32 
GeneralJava to C# conversion Pin
james_dixon_200817-Feb-08 7:54
james_dixon_200817-Feb-08 7:54 
GeneralRe: Java to C# conversion Pin
Paul Conrad17-Feb-08 7:59
professionalPaul Conrad17-Feb-08 7:59 
GeneralRe: Java to C# conversion Pin
Pete O'Hanlon17-Feb-08 10:39
mvePete O'Hanlon17-Feb-08 10:39 
Generaltext box issues Pin
cmandy17-Feb-08 7:30
cmandy17-Feb-08 7:30 
Using the code below. Set up a button that would take the value of textbox 2 so that I can pass it to another part of this application? How would you suggest setting up two other queries that would join with the first query to fill in other textboxes?

EX:

Textbox 1 = query1 (main query) textbox 2 = query1 (main query) textbox 3 =query2 (sub query) textbox 4 = query3 (sub query 2)



Sub query -> select column a from table2, table1 where id.table1 = id.table2



And then

Sub query 2 -> select column c from table 2, table 1 where id.table1 = id.table2 and column a – column b



Thank you in advance

public Form1()<br />
<br />
{<br />
<br />
InitializeComponent();<br />
<br />
}<br />
<br />
string tb1 = "*";<br />
<br />
string tb2 = "*";<br />
<br />
private void textBox1_TextChanged(object sender, EventArgs e)<br />
<br />
{<br />
<br />
if (textBox1.Text.Length > 0)<br />
<br />
{<br />
<br />
tb1 = textBox1.Text;<br />
<br />
}<br />
<br />
else <br />
<br />
{ <br />
<br />
tb1 = "*";<br />
<br />
}<br />
<br />
performQuery();<br />
<br />
}<br />
<br />
private void textBox2_TextChanged(object sender, EventArgs e)<br />
<br />
{<br />
<br />
if (textBox2.Text.Length > 0)<br />
<br />
{<br />
<br />
tb2 = textBox2.Text;<br />
<br />
}<br />
<br />
else<br />
<br />
{<br />
<br />
tb2 = "*";<br />
<br />
}<br />
<br />
performQuery();<br />
<br />
}<br />
<br />
public void performQuery()<br />
<br />
{<br />
<br />
string yourQuery = "SELECT * FROM Table1 WHERE Column1 = " + tb1 + " AND Column2 = " + tb2;<br />
<br />
//execute query from database<br />
<br />
}

GeneralRe: text box issues Pin
Gareth H17-Feb-08 8:52
Gareth H17-Feb-08 8:52 
GeneralRe: text box issues Pin
cmandy17-Feb-08 9:28
cmandy17-Feb-08 9:28 
GeneralRe: text box issues Pin
Christian Graus17-Feb-08 10:00
protectorChristian Graus17-Feb-08 10:00 
GeneralVisual to Logic Pin
EEE 717-Feb-08 5:08
EEE 717-Feb-08 5:08 
GeneralRe: Visual to Logic Pin
Paul Conrad17-Feb-08 7:15
professionalPaul Conrad17-Feb-08 7:15 
GeneralRe: Visual to Logic Pin
Ravi Bhavnani17-Feb-08 8:04
professionalRavi Bhavnani17-Feb-08 8:04 
QuestionHow to detect the current email address???? Pin
Emanuil ACHIM17-Feb-08 5:04
Emanuil ACHIM17-Feb-08 5:04 
GeneralRe: How to detect the current email address???? Pin
Ravi Bhavnani17-Feb-08 8:03
professionalRavi Bhavnani17-Feb-08 8:03 
GeneralRe: How to detect the current email address???? Pin
SilimSayo18-Feb-08 10:03
SilimSayo18-Feb-08 10:03 
GeneralButtons don't show in program [modified] Pin
electriac17-Feb-08 4:09
electriac17-Feb-08 4:09 
GeneralRe: Buttons don't show in program Pin
Luc Pattyn17-Feb-08 4:37
sitebuilderLuc Pattyn17-Feb-08 4:37 
GeneralRe: Buttons don't show in program Pin
electriac17-Feb-08 5:03
electriac17-Feb-08 5:03 
GeneralRe: Buttons don't show in program Pin
darkelv17-Feb-08 14:38
darkelv17-Feb-08 14:38 
Generalhttp posting data and reading data post Pin
Eli Nurman17-Feb-08 3:46
Eli Nurman17-Feb-08 3:46 
GeneralRe: http posting data and reading data post Pin
tarasn17-Feb-08 5:29
tarasn17-Feb-08 5:29 
AnswerRe: http posting data and reading data post Pin
Ravi Bhavnani17-Feb-08 8:06
professionalRavi Bhavnani17-Feb-08 8:06 
GeneralRe: http posting data and reading data post Pin
Eli Nurman17-Feb-08 12:05
Eli Nurman17-Feb-08 12:05 

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.