dickersonka 104

You need the user control to save its data, not sure what you need so can't give you any tips there yet. I don't know how they work, but you might be able to make them member variables on the form and never dispose of them.

My advice would be to set your area you want to display the user control in as a panel.
Upon clicking each menu item, you would have something like:

[CODE]
//Create control
//This might be a member variable instead
DeSched Deschedule = new DeSched();
//Clear controls
this.panel.Controls.Clear();
//Add control
this.panel.Controls.Add(Deschedule);
[/CODE]

dickersonka 104

You really can't do this from the fileupload control. Based on certan ie permission settings, it won't always work in ie either.
My advice is to use either your own control and load the textbox value on postback, or use a 3rd party control.

You normally don't need, care, and so on....of what the path was on the client side.
You might want to rethink the way you are doing things if you need the client path.

dickersonka 104

Lots of moving pieces here. This most likely makes me think its a permission issue connecting to the database, but might not be.
Can you make sure your connection string is connecting as a single user to the database with the same host, regardless of the logging in user?
Any mysql errors or exceptions you are getting, other than user name not found?

dickersonka 104

You have to show us what you got before we can help you

dickersonka 104

you need to have an open connection, just as it says, right before you call execute reader call this

[CODE]
if (conn1.State != ConnectionState.Open)
{
conn1.Open();
}
[/CODE]

also it would be a good idea to create a separate class or method for calling all sql functions, that way you don't have to worry about closing and opening except in a single place

dickersonka 104

whether it is buttons or textboxes, still the same concept

[code]
//form 1
frmKeypad frmKey = new frmKeypad();
frmKey.ShowDialog();
this.btnQuestion.Text = frmKey.SelectedKey;

//form 2
private string selectedKey;
public string SelectedKey
{
get{ return selectedKey; }
}

//sample with just one button
private void btnOne_Click(object sender, EventArgs e)
{
this.selectedKey = "1";
}
[/code]

you can get creative with this and use a more generic method of doing this, but those are the basics

dickersonka 104

here's a link on a small little sample i did for that

[url]http://alleratech.com/blog/post/Sharing-data-between-forms-with-C.aspx[/url]

dickersonka 104

you are trying to run the jar file

do you have this in there?

[code]
public static void main(String [] args)
[/code]

i'm assuming you don't, but for a jar file to be run, just like any other code, it needs to start with a main method

dickersonka 104

its because you are using an untyped list for one, but you didn't have an else statement

[code]
if (yourValue == "b")
{
break;
}
else
{
numbers.Add(Convert.ToInt32(yourValue));
}
[/code]

also you could use List instead of ArrayList

[code]
List numbers = new List();
[/code]

dickersonka 104

there are other ways you could do this, but here's one

[code=sql]
select
CAST(Reference AS INT) as REFERENCE
from tablename
[/code]

dickersonka 104

you don't always have to use that way, but you can

you could also do something like this

[code]
foreach(int num in numbers)
{
Console.WriteLine(" " + num);
}
[/code]

dickersonka 104

this will loop through all the values in your array
IEnumerator basically means you can use it to iterate your data

lets say you have 1, 5, 3, 8 in your array

this will print out

1 5 3 8

dickersonka 104

also try this statement also

[code=sql]
select * FROM assign2 WHERE UPPER(CONVERT(keyword1 USING latin1)) LIKE '%MICROSOFT%';
[/code]

dickersonka 104

What type of collation is this?

run this

[code=sql]
SHOW FULL COLUMNS FROM assign2;
[/code]

dickersonka 104

Awesome, you happen to know what the issue was with the one we were working with?

dickersonka 104

the stop table is only used in the subquery and can't be referenced outside of it

i don't get why, but it looks like the isdrop =1 is not just joining on those records

try adding this piece in as well

[code]
inner join
jobxstop jxs
on jxs.isdrop = 1 and jxs.stopid = stop.stopid
[/code]

dickersonka 104

its not late, only 5, just got a few left before work is done though, there is some data in here that isn't jiving

this will do a partial update, but might help determine what is going on

add this bottom line here and then we can see what rows aren't updated
[code]
and jh.jobstatusid = 10
and jobhistory.histjobid = jh.histjobid
and stop.stopcompletiondatetime is not null)
[/code]

dickersonka 104

so close, just something in there i'm just not catching right now, one last try for the evening, cross our fingers

[code]
UPDATE jobhistory
SET modifieddt =
(SELECT top 1 stop.stopcompletiondatetime
from stop
inner join
jobxstop jxs
on jxs.stopid = stop.stopid
inner join jobhistory jh
on jh.histjobid = jxs.jobid
where jxs.isdrop = 1
and jh.jobstatusid = 10
and jobhistory.histjobid = jh.histjobid)
where jobhistory.jobstatusid = 10
[/code]

dickersonka 104

but all stop.stopcompletiondatetime are not null?

dickersonka 104

hmmmm,

run this

[code]
select jobhistory.histjobid, stop.stopcompletiondatetime
from jobhistory
inner join jobxstop
on jobxstop.jobid = jobhistory.histjobid
inner join stop
on stop.stopid = jobxstop.stopid
where jobhistory.JobStatusID = 10
and jobxstop.isdrop = 1
[/code]

think there might be something funny going on here

dickersonka 104

sorry long day already, i didn't have the join on the original table, lets go back to your query the first time with that one line removed

[code]
UPDATE jobhistory
SET modifieddt = stop.stopcompletiondatetime
FROM jobhistory
INNER JOIN jobxstop
ON jobxstop.jobid = jobhistory.histjobid
AND jobxstop.isdrop = 1
INNER JOIN stop
ON stop.stopid = jobxstop.stopid
WHERE jobhistory.JobStatusID = 10
[/code]

does this one complain about the null values?

dickersonka 104

i can't completely tell the structure, but i believe this will work, just make sure you do a backup first!!!

[code]
UPDATE jobhistory
SET modifieddt =
(SELECT stop.stopcompletiondatetime
from stop
inner join
jobxstop jxs
on jxs.stopid = stop.stopid
inner join jobhistory jh
on jh.histjobid = jxs.jobid
where jxs.isdrop = 1
and jh.jobstatusid = 10)
[/code]

if it complains about multiple values do a select top 1 from the subquery

dickersonka 104

you have this in here
INNER
JOIN stop
ON stop.stopcompletiondatetime = jobhistory.modifieddt

which will not work, because stopcompletiondatetime does not equal your modifieddt

dickersonka 104

The exe is the compiled solution, all exes have already been compiled as well

if you are in a winforms app, it needs to be compiled before running it, if you are in asp.net you can set the project not to be built until specifically build the project

if your project is getting to be that large, then possibly separate your reference dlls out into a separate solution, and build those when necessary, and have the main app reference the dlls rather than projects

alc6379 commented: very good real-world use case here. +12

dickersonka 104

In the past I have used SharpZipLib

[url]http://www.icsharpcode.net/OpenSource/SharpZipLib/[/url]

dickersonka 104

[code]
select p.ID,
(SELECT SUM(i.IncomeAmount) from Income i where i.PersonId = p.ID) AS INCOME_AMOUNT,
(SELECT SUM(o.OutcomeAmount) from Outcome o where o.PersonId = p.ID) AS OUTCOME_AMOUNT
from Person p
[/code]

dickersonka 104

[code]
select top 3 *
from tableName
order by col3 desc
[/code]

bharatshivram commented: thanx for your reply. +2

dickersonka 104

[code]
System.Diagnostics.Process.Start("calc")
[/code]

chitopolo commented: Thank You very much i was looking for this code like since 2 hours ago..! Thank u again! +0

dickersonka 104

Ok, just wanted to make sure we aren't chasing a ghost

Rather than just adding the parameters with a name and value, try to add them with a name and type
[code]
SqlParameter param1 = new SqlParameter("@RDate", SqlDbType.DateTime);
param1.Value = dtCurrentDate;
sqlCmdCheckDuplicates.Parameters.Add(param1);
[/code]

and do the same for the other one

dickersonka 104

this doesn't have error handling, but here is how you do it following your line

[code]
$result = $mysqli->query($queryStr);

$row_count = $result->num_rows;

$result->close();
[/code]