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
M

MaxRelaxman

@MaxRelaxman
About
Posts
40
Topics
12
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • IIS7 Not passing Headers?
    M MaxRelaxman

    I have a web application running on IIS7 Server 2008 (obviously :)) My web app is accessed AFTER the user logs in from a global login page that passes the user's user name in the http header. I have an app running on IIS6 that reads this information just fine, unfortunately my app running on IIS7 doesn't. I've examined the http header for the apps running on each site and the IIS7 site is definitely not passing any of the header info generated by the login server. Has anyone seen this before? I'm hoping it's just a minor configuration issue on IIS7. Thanks!!!!

    Web Development sysadmin help question workspace

  • Getting side projects
    M MaxRelaxman

    Perhaps my girls (twins) are just evil then. They're 3 and they still don't sleep. Well now it's more a problem with getting them to stop running around their bedroom at bedtime and not waking me up at 5am :laugh:

    The Lounge question lounge

  • Another IN clause Question
    M MaxRelaxman

    I'll have to experiment in that direction then. This is a nasty complicated app and I'll need all the little speed boosts I can get. Thanks!

    Database question database

  • Another IN clause Question
    M MaxRelaxman

    Excellent, thank you for your help! One thousand internet dollars are coming your way, just put your ethernet cable into the trash can can to catch it all.

    Database question database

  • Another IN clause Question
    M MaxRelaxman

    Using a JOIN will improve speed?

    Database question database

  • Another IN clause Question
    M MaxRelaxman

    I'm having some issues with a Query I'm trying to use to fine similar records in a master table. There are several child tables that will be searched in a similar way. Basically, if there are more than two matches in the sub query I want to display those records. Can anyone point me in the right direction to get this query to work? I understand why I can't use more than one field in my subquery but I can't think of another way to do this.

    SELECT *
    FROM UC
    WHERE uc_key IN (SELECT mo_Key, COUNT(mo_key) as KeyCount
    FROM MO
    WHERE (mo_MoKey = @Key1 AND mo_Value = @Value1) OR (mo_MoKey = @Key2 AND mo_Value = @Value2) <- there will be a variable number of these that get generated programatically
    AND KeyCount > 2)

    (note, the table names have been mangled to protect the innocent) Thanks, any ideas are appreciated.

    Database question database

  • AMATEUR PROGRAMMER NEEDS HELP WITH SERIALIZATION
    M MaxRelaxman

    Going wrong? I don't think so. My 32 bit app beats everything else out there. Well obviously something is going wrong. If you 3000k if statement wonder program can run circles around everything else ever written by mankind, why don't you just use your old VS version? I don't mean to be hostile, but it seems like you're being hostile to everyone that's trying to help you. You're going to have to learn correct terminology if you're going to a) get your point across and b) understand what people are trying to tell you. Perhaps the sound of your own awesome is distracting you?

    C# c++ question json help

  • Updating Child Table's Key (almost have it)
    M MaxRelaxman

    I'm trying to use a SqlDataAdapter to update a dataset containing multiple tables linked by a common parent table. I've set up my relations and ALMOST everything is working except for when my RowUpdated event handler tries to retrieve the identity field. Here's my code (without the try/catch/finally stuff and sanitized field names) private void ParentRowUpdated(object sender, SqlRowUpdatedEventArgs e) { SqlCommand dbCommand = new SqlCommand("SELECT @@Identity"); SqlConnection cn = new SqlConnection(GetConnString(m_strConnStringName)); using (SqlConnection dbConn = new SqlConnection(GetConnString(m_strConnStringName))) { using (SqlDataAdapter daAdapter = new SqlDataAdapter()) { dbCommand.Connection = e.Command.Connection; daAdapter.SelectCommand = dbCommand; e.Row["p_key"] = Int32.Parse(daAdapter.SelectCommand.ExecuteScalar().ToString()); e.Row.AcceptChanges(); } } } Using @@Identity in my select query does retrieve the correct Identity value. However, when I try using SCOPE_IDENTITY() I get a blank value returned. I don't like using @@Identity because this will be a multi user system so I'm worried about getting the wrong value. Does anyone have any idea of a better way to do this? Thanks!

    C# database question announcement

  • MEMRI: Child Stabs President Bush to Death ...
    M MaxRelaxman

    Of children's cartoons? I suppose it's better than an anvil on the head.

    The Back Room

  • Automatic Properties
    M MaxRelaxman

    He will if you name all your controls TextBox1 and ComboBox1 though. Okay, I can dream...

    C# question

  • DataTables as Session object issues?
    M MaxRelaxman

    That seems like the best solution. Use an array to hold the data and built an interface around it. Thanks!

    ASP.NET database performance question learning

  • DataTables as Session object issues?
    M MaxRelaxman
    1. So have a set of duplicate temp tables in the database? Maybe use the user's id as the record IDs. 2) Question, why would you use view state over session objects? I guess the view state would save memory on the server but it wouldn't the increased page size slow down the user's browser? I guess using AJAX update panels would help with that. Thanks for your response!
    ASP.NET database performance question learning

  • DataTables as Session object issues?
    M MaxRelaxman

    Besides memory consumption, are there any issues I should be aware of when keeping DataTables in a session object? Here's my situation: When a user adds a new entry into the database, there are of course a pile of related child tables that have to be filled in as well. When working with a new record, there won't be an valid ID for the parent record so I'm doing everything in memory until the user hits 'save'. I've already got a couple of my GridViews working fine but I was wondering if there where any gotcha's. Thanks!

    ASP.NET database performance question learning

  • Toad for SQL - Worth it?
    M MaxRelaxman

    Thanks for the info! Too bad, I like the skinning options.

    The Lounge question database oracle sales announcement

  • General question about MS Certifications
    M MaxRelaxman

    My favorite book is Programming C# from O'Reilly. Actually I've never gone wrong by buying an O'Reilly book. http://www.oreilly.com/pub/topic/csharp[^] You may also want to look into training Videos. We just bought some for our new programmer. We're using AppDev http://www.appdev.com/csharp.asp[^]

    C# csharp help question lounge learning

  • Toad for SQL - Worth it?
    M MaxRelaxman

    I'm doing my budget requests and I was looking at Toad for SQL. I'm currently playing with the trail version but I have to write up my request ASAP so I was wondering if anyone here is/was a user. Is it worth it? I'm a programmer who's untrained as a DBA but who is now functioning as a DBA as well as a programmer (without training of course). I've searched around for reviews but I can only find sales pitches for the freebie version. And any other SQL tool suggestions are welcome :) Thanks! (Sorry if this is the wrong forum for this post, it seemed like the best one since it's not a technical/programming question).

    The Lounge question database oracle sales announcement

  • Is strongly typed database code worth it? It's giving me a headache!
    M MaxRelaxman

    On program startup, you could query the schema for all your tables. Build class to hold information like field names, value types and lengths. Here's some of my code, I'm sure most people here can come up with something more effecient :-D. The tabbing is getting killed but you get the idea. Mine looks something like this namespace DBWrapper { public class FieldInfo { private string strField = string.Empty; private string strType = string.Empty; private int nLen = 0; public string FieldName { get { return strField; } set { strField = value; } } public string FieldType { get { return strType; } set { strType = value; } } public int FieldLen { get { return nLen; } set { nLen = value; } } } public class TableData : List { /// /// Returns a FieldInfo Struct based on the provided field name. /// /// /// null on failure public FieldInfo Get(string strFieldName) { FieldInfo retFieldInfo = new FieldInfo(); foreach (FieldInfo fiInfo in this) { if (string.Compare(fiInfo.FieldName, strFieldName, true) == 0) return fiInfo; } return new FieldInfo(); } } } To get the schema info I use this (I think this is half my code and half somebody elses but it's been so long since I touched it I don't remember) protected bool GetTableSchema(out DataTable dtSchema) { dtSchema = new DataTable(); SqlCommand dbCommand = new SqlCommand(); SqlDataReader dbReader; bool bRetValue; if (!OpenDatabase()) return false; try { dbCommand.CommandText = "SELECT * FROM " + m_strTableName; dbCommand.Connection = m_DBConnection; dbReader = dbCommand.ExecuteReader(CommandBehavior.KeyInfo); dtSchema = dbReader.GetSchemaTable(); bRetValue = true; } catch (Exception ex) { string strErrorMessage = "Error Getting Table Schema " + dbCommand.CommandText + "\r\nMsg: " + ex.Message; #if DEBUG Console.WriteLine(strErrorMessage); #else m_LogHandler.WriteLogLine(strErrorMessage); #endif bRetValue = fal

    C# database csharp java question asp-net

  • Thread exits after break point
    M MaxRelaxman

    Nevermind, I solved the problem. (I moved the class initialization into a method of the calling class rather than doing class Blah = new Blah() when declaring it as a property)

    Visual Studio csharp debugging question

  • Thread exits after break point
    M MaxRelaxman

    Okay this is weird. I'm running VS2005 and I have a breakpoint set inside a thread. When I try to step into or step over the code, the thread exits with execution result of 0 (0x0) Actual Message: The thread '' (0xcdc) has exited with code 0 (0x0) If I remove the breakpoint, a later breakpoint hits fine (meaning the previous code executed okay) but again I cannot step into or step over the code. This code was debugging fine yesterday. Does anyone have any idea what I've done wrong? Thanks! EDIT: I should probably mention that the code in is C#

    Visual Studio csharp debugging question

  • how to make screen
    M MaxRelaxman

    I recommend the following two books For C# Programming: http://www.amazon.com/Programming-C-Building-NET-Applications/dp/0596006993/ref=pd_bbs_sr_1/103-9225262-2411817?ie=UTF8&s=books&qid=1190641792&sr=8-1[^] And for your other issue: http://www.amazon.com/Deluxe-Transitive-Vampire-Handbook-Innocent/dp/0679418601/ref=pd_bbs_sr_1/103-9225262-2411817?ie=UTF8&s=books&qid=1190641863&sr=1-1[^]

    C# question tutorial
  • Login

  • Don't have an account? Register

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