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

C#

 
QuestionHow to use Application.ApplicationExit event? Pin
Sokka9320-Nov-08 5:22
Sokka9320-Nov-08 5:22 
AnswerRe: How to use Application.ApplicationExit event? Pin
Giorgi Dalakishvili20-Nov-08 5:36
mentorGiorgi Dalakishvili20-Nov-08 5:36 
Questionis it posible to open 2 database in WinCe ? Pin
E_Gold20-Nov-08 4:05
E_Gold20-Nov-08 4:05 
AnswerRe: is it posible to open 2 database in WinCe ? Pin
Ennis Ray Lynch, Jr.20-Nov-08 5:29
Ennis Ray Lynch, Jr.20-Nov-08 5:29 
GeneralRe: is it posible to open 2 database in WinCe ? Pin
E_Gold20-Nov-08 8:47
E_Gold20-Nov-08 8:47 
QuestionSimultaneous read/write to a filter. Pin
SanchitK20-Nov-08 3:33
SanchitK20-Nov-08 3:33 
AnswerRe: Simultaneous read/write to a filter. Pin
Andrew Rissing20-Nov-08 4:03
Andrew Rissing20-Nov-08 4:03 
Questionneed help with code Pin
Melanie Booysen20-Nov-08 2:57
Melanie Booysen20-Nov-08 2:57 
can you please help me....
i have the following code firstly i want to know if logic is correct then secondly i want to know how do i exist the second for loop to get back into the first for loop. the reason for this is once the values in one of the columns of the two tables is different it should write to a temp table in the database and then it should go out of that row and test the next row in the datarow.
code is below

Confused | :confused:


OpenDb();

SqlQuery = "select * from " + Table1 + " where " + txt_comkey_tbl1.Text + " in (select " + txt_comkey_tbl2.Text + " from " + Table2 + ")";
sqlquery = "select * from " + Table2 + " where " + txt_comkey_tbl2.Text + " in (select " + txt_comkey_tbl1.Text + " from " + Table1 + ")";

DataSet ds = new DataSet();
OleDbDataAdapter oda = new OleDbDataAdapter(SqlQuery,dbConn);

oda.Fill(ds, Table1);

int intSkip2 = 0, w = 0;
int intSkip3 = 0, k = 0;

DataSet dp = new DataSet();
OleDbDataAdapter oda1 = new OleDbDataAdapter(sqlquery,dbConn);


oda1.Fill(dp, Table2);

//check what the dataset contains

foreach (DataRow dr in ds.Tables[Table1].Rows)
{
foreach (DataRow drp in dp.Tables[Table2].Rows)
{
for (int i = 0; i < ds.Tables[Table1].Rows.Count; i++)
{
for (int p = 0; p < ds.Tables[Table1].Columns.Count; p++)
{
if (dr[p].ToString() == drp[p].ToString())
{
string tableresults3 = dr.ItemArray[p].ToString();
string tableresults4 = drp.ItemArray[p].ToString();
}
else
{
string tableresults5 = dr.ItemArray[p].ToString();
string tableresults6 = drp.ItemArray[p].ToString();

insertquery = "select * into mytable from " + Table1 + " where " + ds.Tables[Table1].Columns[i].ToString() + " = " + dr.ItemArray[i].ToString();
insertquery2 = "select * into mytable2 from " + Table2 + " where " + dp.Tables[Table2].Columns[i].ToString() + " = " + drp.ItemArray[i].ToString();

OpenDb();
dbCmd = new OleDbCommand();

dbCmd.Connection = dbConn;
dbCmd.CommandText = insertquery;
dbCmd.CommandType = CommandType.Text;
dbCmd.ExecuteNonQuery();

OpenDb();
dbCmd = new OleDbCommand();

dbCmd.Connection = dbConn;
dbCmd.CommandText = insertquery2;
dbCmd.CommandType = CommandType.Text;
dbCmd.ExecuteNonQuery();
}
}
}
}
}
AnswerRe: need help with code Pin
Guffa20-Nov-08 3:53
Guffa20-Nov-08 3:53 
GeneralRe: need help with code Pin
Luc Pattyn20-Nov-08 13:53
sitebuilderLuc Pattyn20-Nov-08 13:53 
AnswerRe: need help with code Pin
Andrew Rissing20-Nov-08 4:01
Andrew Rissing20-Nov-08 4:01 
QuestionHow to iterate over an anonymous variable Pin
Michael Demeersseman20-Nov-08 2:44
Michael Demeersseman20-Nov-08 2:44 
QuestionDLL Search Order Pin
jchigg200020-Nov-08 2:11
jchigg200020-Nov-08 2:11 
AnswerRe: DLL Search Order Pin
Dave Kreskowiak20-Nov-08 3:33
mveDave Kreskowiak20-Nov-08 3:33 
Questionhow to mouse gesture without window? Pin
ping_jacob20-Nov-08 2:10
ping_jacob20-Nov-08 2:10 
AnswerRe: how to mouse gesture without window? Pin
Giorgi Dalakishvili20-Nov-08 2:14
mentorGiorgi Dalakishvili20-Nov-08 2:14 
GeneralRe: how to mouse gesture without window? Pin
jchigg200020-Nov-08 2:18
jchigg200020-Nov-08 2:18 
GeneralRe: how to mouse gesture without window? Pin
Giorgi Dalakishvili20-Nov-08 2:20
mentorGiorgi Dalakishvili20-Nov-08 2:20 
GeneralRe: how to mouse gesture without window? Pin
jchigg200020-Nov-08 2:24
jchigg200020-Nov-08 2:24 
GeneralRe: how to mouse gesture without window? Pin
Darryl Borden20-Nov-08 8:44
Darryl Borden20-Nov-08 8:44 
GeneralRe: how to mouse gesture without window? Pin
ping_jacob22-Nov-08 2:35
ping_jacob22-Nov-08 2:35 
GeneralRe: how to mouse gesture without window? Pin
Giorgi Dalakishvili22-Nov-08 3:18
mentorGiorgi Dalakishvili22-Nov-08 3:18 
GeneralRe: how to mouse gesture without window? Pin
ping_jacob14-Dec-08 6:22
ping_jacob14-Dec-08 6:22 
GeneralRe: how to mouse gesture without window? Pin
Giorgi Dalakishvili14-Dec-08 7:03
mentorGiorgi Dalakishvili14-Dec-08 7:03 
Questionhow to access a property / member variable at run time Pin
here2learn20-Nov-08 1:02
here2learn20-Nov-08 1:02 

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.