SteveL714, you have to do it that way because Objects store in SessionState are exactly that, Objects, they are not strongly typed
Rhys
"Technological progress is like an axe in the hands of a pathological criminal"
"Two things are infinite: the universe and human stupidity; and I'm not sure...
..or...
comm.Parameters.Add(new SqlParameter { ParameterName = @"@p1", Value = textBox1.Text, SqlDbType = SqlDbType.VarChar });
Rhys
"Technological progress is like an axe in the hands of a pathological criminal"
"Two things are infinite: the universe and human stupidity; and I'm not sure...
[code]
comm.Parameters.Add(new SqlParameter("@p1", textBox1.Text));
[/code
Rhys
"Technological progress is like an axe in the hands of a pathological criminal"
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe"
Albert Einstein
Objects store in Session are exactly that, Objects, they are not strongly typed and unlike VB which lets you get away with murder, (as has been said), c# is a lot more stringent. Firstly, I would check that the Session object actually exists by performing a null check;
if(Session["WorkerId"]...
Ignore first sentence of my reply... it was early, I was tired and looking at three things at once... ahem [dazed]
Rhys
"Technological progress is like an axe in the hands of a pathological criminal"
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the...
Just off of your code please note if (Idx >= -1), the indexing on the list will be zero based. Anyway, how about using the Find method instead, something along the lines of;
CarMovement carMovement = Movement.Find(item => item.SourceCtrl.Equals(txt.Name...
A list is just a list of objects be those objects simple or complex. How about a basic class to maintain your manipulated/moved data and a collection of those as a list?
Sorry, c#...
public class Dummy
{
public int Id { get; set; }
public string TextContent { get; set; }
public TextBox...
Windows or Web forms?...
Either way you should be able to directly iterate the controls, (and their child controls), on a page or form. Both the System.Web.UI.Page and System.Windows.Forms.Form class have a 'Controls' property, which is Control Collection object. What you'll need to do is a two...
you'll hate me for it but...
SELECT Year, 1 AS MONTH, Month1 AS MONTH_VALUE
FROM YourTable
WHERE Month1 IS NOT NULL
UNION
SELECT Year, 2 AS MONTH, Month2 AS MONTH_VALUE
FROM YourTable
WHERE Month2 IS NOT NULL
UNION
SELECT Year, 3 AS MONTH, Month3 AS MONTH_VALUE
FROM YourTable
WHERE Month3 IS...
Have you, (or your DBA's) done any investigation as to how useful those indices really are and if there is any specific and identifiable reason for the time taken?...
Personally, if that's not viable I would separate out your maintenance tasks from your data load tasks and potentially look at...
Please note, (based on my earlier post and the code in the provided link), although both the XACT_STATE and @@TRANCOUNT functions can be used to detect whether the current request has an active user transaction @@TRANCOUNT cannot be used to determine whether that transaction has been classified...
I would very strong looking up and doing some reading around XACT_ABORT() and making use of XACT_STATE() in your catch block to determine the validity of rolling back a transaction as it is possible for the rollback itself to throw and error if it is determined that there is no transaction...
The most simple way, (without refactoring to tidy up the code base), is to put each call in it's own unique method, with each method having a unique try...catch block, OR wrap each call to a unique procedure in its own try...catch block.
Rhys
"Technological progress is like an axe in the...
NB: by '...passing NULL values to the second and third parameters...' I mean that you are in fact passing values when you need to pass in no value at all to utilise the defined defaults. As an aside, any reason you're using COALESCE instead of ISNULL?...
Rhys
"Technological progress is like an...
if you call the proc with;
spADM_RiskData '','',''
You are not passing NULL values to the second and third parameters but empty string values which are not the same. Try;
spADM_RiskData ''
Rhys
"Technological progress is like an axe in the hands of a pathological criminal"
"Two things...
Personally, I would make the parameter nullable then at the top of the procedure do a NULL check on it and set it to CURRENT_TIMESTAMP if it is NULL.
...some parameters...
@EndDate char(10) = NULL
...some more parameters...
...procedure actual activity starts...
SELECT @EndDate =...
In reagrd to an asp.Net control, A checkbox doesn't really have a 'value'. It has a 'Text' property, which is the textual value displayed describing the purpose or meaning of the checkbox, (i.e., Please uncheck if you do not wish to receive marketing from us in the future), and a 'Checked'...
Can you return a 'default' instantiation of a constituent when there isn't an existing on in your data source?
You would probably need to customise the view to template fields so you can hide/show an edit button as appropriate tho' as you probably wouldn't want to allow editing of such.
Rhys...
Without some means of identifying them, as far as I'm aware you are, well, stuffed on this one I'm afraid...
Rhys
"Technological progress is like an axe in the hands of a pathological criminal"
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe"...
Looks to me like baidu is encrypting the actual url, passing it around as a querystring parameter and decrypting as required. You'd have to know how they're encrypting/decrypting the url to get it back out of the querysting and I doubt they're going to share that with you unfortunately.
Rhys...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.