Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
T

TheFM234

@TheFM234
About
Posts
55
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to get default/perferred Network Connection
    T TheFM234

    I've been trying to find out how to find the preferred network connection (ex: WAN or LAN). There's a way to change the connection order in windows, but it doesn't seem like there are WMI classes that contain this connection order. Anyone know where to look/how to find the preferred connection?

    C# sysadmin tutorial question

  • Settings a webusercontrol object's property
    T TheFM234

    I'm trying to add a webusercontrol I've created dynamically through a page. I have the properties all set up correctly, and those are working. What happens when the Page_Load is that the labels that I have in the control are still null when the Page_Load runs, so a NullReferenceNotHandled exception is thrown when I try to access a label's Text property. What am I doing wrong? Maybe I'm using the webusercontrol in the wrong way, I'm used to writing desktop applications... He's the code I'm using, assume that I have the correct code for the properties

    public NewsPost(string title, string date, string message, int newsId)
    {
        this.Title = title;
        this.Date = date;
        this.Message = message;
        this.NewsId = newsId;
    }
    
    protected void Page\_Load(object sender, EventArgs e)
    {
        lblTitle.Text = Title; //NullReferenceNotHandled error is thrown here
        lblDate.Text = Date;
        lblMessage.Text = Message;
    }
    
    ASP.NET help question

  • Thread question ?
    T TheFM234

    The background worker cannot directly access other controls not on it's own thread. What you can do is use the ReportProgress method along with the ProgressChanged event from the BackgroundWorker object. If your using a progress par, you can pass a percent value into ReportProgress(int) from the thread that the background worker is on, and update the value of your progress bar from the ProgressChanged event. There are many articles online about this objects, so search those for syntax and structure ideas.

    C# question help

  • Union query.. I guess:)
    T TheFM234

    You would use a join for this. Select * From City_Info i Inner Join City_Population p on p.City_Id = i.City_Id The output should be similar to:

    City_Id City_Name City_Id City_Population


    1 First City 1 100
    2 Second City 2 200
    3 Third City 3 300

    You probably wouldn't want City_Id two times, so you would need to specify the columns that you want in the select list. Be sure to qualify the column names so you don't get an ambiguous column error (ex: i.City_id, i.City_Name, p.City_Population).

    Database database regex question

  • Thread question ?
    T TheFM234

    If your doing this process from a UI, I suggest researching BackgroundWorkers. If your making a service, then check out the System.Threadding namespace.

    C# question help

  • How to save something in memory to file?
    T TheFM234

    You might be able to use xml serialization to save and load the binary tree.

    C# question com data-structures performance help

  • How to prevent adding a duplicate value into a table
    T TheFM234

    You can add an unique index on the name column.

    Database database visual-studio help tutorial

  • ProgressBar in multi-threaded application
    T TheFM234

    There is a method that background workers have that is called "ReportProgress", and a event called "ProgressChanged" that triggers when the ReportProgress method is called. You can access the ProgressChanged from the original thread, unlike trying to directly access the progress bar via progressbar.value = x.

    C# csharp winforms help tutorial question

  • table
    T TheFM234

    I think you are looking for something like declare @my_table as table (id int,f_name varchar(50),l_name varchar(50)) insert into @my_table (id, f_name, l_name) select id_user, first_name, last_name From dbo.users

    Database com question

  • "Neat-a-fying" a huge query [modified]
    T TheFM234

    You might want to go after the SSIS package approach. It might take longer to create, but it is a lot easier to maintain with larger projects. You might need to ask yourself will you be saving the time in the future by using SSIS?

    Database database html sql-server oracle com

  • between max() and min()
    T TheFM234

    Select Max(id)
    From table
    where id != (Select Max(id) From table)

    The above will give you the second maximum id.

    Database com tutorial question

  • Enum / Cast Question
    T TheFM234

    As Greeeg said above, there is no implicit conversion for a enum into an int. All conversions need to be done explicitly. Just a question/though about your base class: why are you storing the enum as an int? I think for program clarity and maintainability, storing EmployeeType as the enum type would be the best way to go (and it will be more clear if your going to have an object out of the base).

    C# question help

  • Unsigned data type.
    T TheFM234

    There is no unsigned integer types in SQL Server, except for tinyint (0 - 255). You can use an user defined data type, but that will not make the size of the data smaller (which is what I'm assuming you want to do). You can also add a constraint to a column so the value is >= 0. As for saving space, no way to unsign an int.

    Database sql-server tutorial question

  • How do i?
    T TheFM234

    I thought that at first, but it seems like a legit concept. I don't like flipping between a calculator and windows all the time.

    C# question help

  • A question about the DB construction
    T TheFM234

    Something that might happen in the future is that a business might need to have 2 types of schedules, causing duplicate data in the business table on every column but ScheduleId. You could "map" BusinessId's to SchedulesId's in a view, so you might have tables like: BusinessID, Name, ... ScheduleId, Day, StartTime, EndTime Mapping Table: BusinessId, ScheduleId (with a unique index on BusinessId, ScheduleID so you don't dupe data) Then have a view Select ... From MappingTable m Join ... But if you have a business rule similar to one business can have one schedule per day, then I think your Joined solution will work fine.

    Database database help tutorial question

  • T-SQL Help [modified]
    T TheFM234

    I copied and pasted the two queries you supplied into the join sub-query syntax, so the line 11 one is something from the query you supplied (and I'm guessing the second one is resulting from the first error). To try to clear things up for you, here's a simple structure of a sub-query join:

    Select
    <select list>
    From
    (
    <query 1>
    ) q1
    Join
    (
    <query 2>
    ) q2 on
    <join list>
    <other clauses (probably will not have any here)>

    The select must use the names assigned to the columns, so if you have Select Name, Date as OpenDate; then you would need to use Name for name (because the name was not changed) and OpenDate for the original column Date. If you think of the two queries as tables, it might make the concept easier to grasp. If the above query was written from tables, it would be Select * From Table1 q1 Join Table2 q2 on ... Hope that helps.

    Database database help career

  • T-SQL Help [modified]
    T TheFM234

    If your queries return the correct data by themselves, then you should be able to join on a subquerys:

    Select
    total.Cient
    ,TotalTicketsAssigned
    ,TotalClosedForRange
    From
    (
    select count(*) as 'TotalTicketsAssigned' , location_name 'Cient'
    from job_ticket j
    inner join priority_type p on p.priority_type_id = j.priority_type_id
    inner join tech t on t.client_id = j.assigned_tech_id
    inner join location l on l.location_id = j.location_id
    WHERE Report_Date >= DATEADD(dd,-7,CONVERT(DATETIME,CONVERT(CHAR(8),
    GETDATE(),112))) AND
    Report_Date < DATEADD(dd,1,CONVERT(DATETIME,CONVERT(CHAR(8),
    GETDATE(),112)))
    group by l.location_name
    ) total
    Left Join
    (
    select count(*) as 'TotalClosedforRange'
    , location_name 'Cient'
    from job_ticket j
    inner join priority_type p on p.priority_type_id = j.priority_type_id
    inner join tech t on t.client_id = j.assigned_tech_id
    inner join location l on l.location_id = j.location_id
    where (last_status_update_time >= DATEADD(dd,-7,CONVERT(DATETIME,CONVERT(CHAR(8),
    GETDATE(),112))) AND
    Report_Date < DATEADD(dd,1,CONVERT(DATETIME,CONVERT(CHAR(8),
    GETDATE(),112))) ) and
    status_type_id ='3'
    group by l.location_name
    ) Closed on
    total.Cient = closed.Cient

    Database database help career

  • Need help with View <noobie></noobie>
    T TheFM234

    Select AppName, Version, Sum(InstallCount)
    From table
    Group By AppName, Version
    OrderBy AppName

    Database tutorial database algorithms help question

  • A question about the DB construction
    T TheFM234

    I would suggest to accomplish this by using relational tables. Have a table with the business info, and then give the business an Id number. Create a table that has BusinessId,Day, TimeWorkStart, TimeWorkEnd, TimeLunchStart, TimeLunchEnd (or whatever you want to call them). The BusinessID would be the foreign key that would refer to the Business info table. To get the schedule, you would need to join up on the BusinessId of both tables. The way you listed above could be one approach (and I've seen similar things done in program), but you might come to a point where the design restricts you from adding additional schedules without storing a bunch of duplicate data. Also less data is being stored. If your table has 28 columns, but only has, say Monday and Tuesday workdays, then there are 20 unused columns.

    Database database help tutorial question

  • mysql data type
    T TheFM234

    Blob, which stands for Binary large object.

    Database question database mysql help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups