Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Rhys666

    C# and ASP.Net Session Values

    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...
  2. Rhys666

    Procedure expects a parameter which was not supplied.

    ..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...
  3. Rhys666

    Procedure expects a parameter which was not supplied.

    [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
  4. Rhys666

    C# and ASP.Net Session Values

    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"]...
  5. Rhys666

    Update element value in a List (of Class)

    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...
  6. Rhys666

    Update element value in a List (of Class)

    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...
  7. Rhys666

    Alternative to 2-dimension array that needs to get larger?

    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...
  8. Rhys666

    Finding control on form / Setting text value of 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...
  9. Rhys666

    Transpose columns to rows

    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...
  10. Rhys666

    Workround not being able to partition in SQL 2005?

    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...
  11. Rhys666

    My Try / Catch / Begin Tran / Rollback tran question

    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...
  12. Rhys666

    My Try / Catch / Begin Tran / Rollback tran question

    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...
  13. Rhys666

    ASP.NET 4 vb need help with error and better reporting to identify exact cause.

    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...
  14. Rhys666

    default values not working for SP?

    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...
  15. Rhys666

    default values not working for SP?

    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...
  16. Rhys666

    setting a default date to an SP's parameter

    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 =...
  17. Rhys666

    How to Parse Checkbox Input Type Value to String

    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'...
  18. Rhys666

    Records won't display in DetailsView

    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...
  19. Rhys666

    t-sql - bottom 10 records where there is no field to sort by

    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"...
  20. Rhys666

    How do you programmatically expand a url link to its true location?

    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...

Part and Inventory Search

Back
Top