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

tkrn

@tkrn
About
Posts
22
Topics
13
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Username Rename‏
    T tkrn

    Some time ago, I renamed my username from my full name to tkrn. I would like to retro-actively update any occurrences of my past username since it has my full name it. Can I request that any finding of my old username to be renamed to tkrn? Thank you, Patrick

    Site Bugs / Suggestions question announcement

  • Access single executescalar value from dataset?
    T tkrn

    Thats the thing, the error occurs at int returnValue = (int)(this.presetTableAdapter.ExistPreset(txtToolNumber.Text));

    C# question

  • Access single executescalar value from dataset?
    T tkrn

    Negative.

    C# question

  • Access single executescalar value from dataset?
    T tkrn

    It is indeed removed from the post. int returnValue = (int)(this.presetTableAdapter.ExistPreset(txtToolNumber.Text)); The error from the stack is, "Object reference not set to an instance of an object." which i know it could mean a million and a half things. presetTableAdapter is publicly accessible table adapter, ExistPreset exists and is correct. MSSql outputs a 1 or 0 as it should. txtToolNumber.Text has a value. ::bashes head against monitor:: Mika, thanks for your help

    C# question

  • Access single executescalar value from dataset?
    T tkrn

    that is from a method from the tableadapater/dataset designer. that is stored procedure that returns a zero or a one. I tried what is followed here but it does not work, http://msdn.microsoft.com/en-us/library/37hwc7kt.aspx[^]

    C# question

  • Access single executescalar value from dataset?
    T tkrn

    this.presetTableAdapter.ExistPreset(txtToolNumber.Text); I am trying to access a single value from a dataset, this is how i am calling it, how can i access the value from that dataset? It either outputs a 1 or a 0, pretty straight forward right?

    C# question

  • Using files that are located under the project?
    T tkrn

    I have a two files lets say File1.BMP and File2.TXT which i want to write on the hard drive. How do i access those files that are included the project? I am looking to have these two files to be compiled into the executable and be extracted at a certain point in my application. I've tried looking around but have not found that much. Thank you in advance.

    C# question

  • How do I have a class globally accessible throughout an entire project/application
    T tkrn

    I am trying to create a Log Console that will be a hidden form that will called up when LogConsole.Show() is issued, and write to the Data Grid that is not bound by using the methods as defined. I never done anything like that and I need direction. Take a look at the code below to get a feel for what i am trying to do.

    namespace System.Diagnostics
    {
    public class LogConsole
    {
    public static readonly LogConsole Instance = new LogConsole();
    private LogConsoleWrapper LogConsoleForm = new LogConsoleWrapper();

        public void Show()
        {
            LogConsoleForm.Show();
        }
    
        public void Hide()
        {
            LogConsoleForm.Hide();
        }
    
        public void Focus()
        {
            LogConsoleForm.Focus();
        }
    
        public void WriteLine(string message)
        {
            LogConsoleForm.Write(message);
        }
    
        public void WriteLine(string message, bool error)
        {
            LogConsoleForm.Write(message, error);
        }
    
        public void WriteLine(string message, Exception ex)
        {
            LogConsoleForm.Write(message, (Exception)ex);
        }
    }
    
    public class LogConsoleWrapper : System.Windows.Forms.Form
    {
        /// /// Required designer variable.
    	/// 
    	/// 
    	private System.ComponentModel.Container components = null;
    
        static string sSource = "PIMSLite2008 Log Console";
        static string sLog = "Application";
    
        public LogConsoleWrapper()
    	{
    		InitializeComponent();
    
            if (!EventLog.SourceExists(sSource))
                EventLog.CreateEventSource(sSource, sLog);
    
            clock.Start();
            lblUser.Text = System.Environment.UserName.ToString().ToUpper();
    	}
    
        /// /// Clean up any resources being used.
        /// 
        /// 
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
    
        #region User Defined Code
    
        private void clock\_Tick(object sender, EventArgs e)
        {
            lblDate.Text = DateTime.Now.ToShortDateString();
            lblTime.Text = DateTime.Now.ToLongTimeString();
        }
    
        public void Write(string message)
        {
            string\[\] tmp = new string\[3\];
    
            tmp\[0\] =
    
    C# css docker help question workspace

  • [Message Deleted]
    T tkrn

    [Message Deleted]

    C#

  • When binding to a DataGridView ComboBox I always get this error message!?
    T tkrn

    I grabbed the error from the data grid and just canceled the exception. e.Cancel = true worked great! Probably not the best way to deal with it but I was reading something that I believe is the source of the issue here, http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=136972&SiteID=1[^]

    C# wpf wcf help question

  • When binding to a DataGridView ComboBox I always get this error message!?
    T tkrn

    "system.formatexception: datagridviewcomboboxcell value is not valid" DataTypes are correct, it selects the right data too. The selections are pulled from one table, the actual selected value is pulled from another. :confused: Any ideas?

    C# wpf wcf help question

  • SQL Datatype WinForm Textbox Validation?
    T tkrn

    The database connections are created using DataSets that are bound to controls to those tables and tableadapters within the dataset. Generally using a binding navigator to cycle through the records where needed.

    C# database regex question

  • SQL Datatype WinForm Textbox Validation?
    T tkrn

    Just like the title sounds. I am looking for a control or something where I can easily validate textboxes depending on the bound data control to that text box. Ideally, VS2008 would know what kind of data type is bound to that field through the datafield but i doubt if such a thing exists. Even if i have to manually say that this text box is only ment for INT SQL datatypes then limits only to 0-9 would be great with block of adding text characters in that text box. I know I can set the length very easily and this is great for varchar fields that are bound to text boxes but i need something for Floats, Reals, Ints that are bound to text boxes! Any suggestions? FYI, I hate Regex but think i may have to go that route. Are there any regex expressions that are compatible with SQL datatypes?

    C# database regex question

  • The day you realized you were a programmer ...
    T tkrn

    It happened today for me. I was digging through lines of code in C# VS2008 when my mind started debugging what I was working on. After a few hundred lines of code later it came down to one debugging error! I saw the objects within my C# app coming together in a visio flow chart in my mind. I took a second and it dawned on me, I am a programmer. Yikes! Considering I come from a very heavy Cisco networking field. Im a well rounded dork now! :-D

    The Lounge csharp help

  • Dataset Designer using it programmatically?
    T tkrn

    I am using an extensive dataset that was designed through the graphical dataset designer, how do i call a method(query) from that dataset programmatically? thanks

    C# question database

  • Datagridview displaying garbage characters
    T tkrn

    The entire database, every table uses varchar not nvarchar. I've had issues in the past with nvarchar too plus it takes more space and computing power plus it is pretty much an all english environment thus no real need for nvarchar. i think you are right with the special formatting not working in a regular textbox/data grid view. I wonder if there is away around that though to ignore which ever charaters.

    C# database help question

  • Datagridview displaying garbage characters
    T tkrn

    Open up note pad, hold the left control and press backspace. You will produce a rectangle box character which i am not sure if it has any function or not in the operating system but when i pull data from my database, these characters appear where i believe are to be carriage returns. is there a way to parse/seperate those garbage characters out while still leaving them in the database? If the data is bound to a richtextbox control, the text appears formated with carriage returns correctly im stuck...

    C# database help question

  • LogConsole? Recommendations?
    T tkrn

    Alright, I have a log console that i have created that is specific for my multi-form application. It is a grid view with methods to write to that grid view, in the event of an Exception, it will take that information then write it to the system log. But, my concept is to have the log console instantiated from the beginning and just toggling the visibility of the form. I've been playing around and reading on the internet different ways to do what i am looking on doing but have not had much luck being able to access that specific method LogConsole.WriteLine(string) other than where it has been instantiated. This would be more of debugging console kinda of, but is ment for the IT people with in my company to be able to pin-point future issues, the log will display, errors, informational sql connection information, etc, etc. Any suggestions to put me in the right direction?

    C# css database question

  • [Message Deleted]
    T tkrn

    [Message Deleted]

    C#

  • Predictive Search within C# Windows Form?
    T tkrn

    Below is the code i used for the autocomplete text box to search through the records and focus on the record closest matched which is scrolled to in the list automatically. What do you think!? ---- private void txtSearchbyPN_KeyUp(object sender, KeyEventArgs e) { string searchStr = txtSearchbyPN.Text.ToString(); int searchLen = txtSearchbyPN.Text.Length; for (int i = 0; i < cachedPartNumbers.Length; i++) { if (cachedPartNumbers[i].Length >= searchLen) { if (searchStr.Equals(((cachedPartNumbers[i].ToString()).Substring(0, searchLen)))) { locationInArray = i; break; } } } dgMainForm.CurrentCell = dgMainForm.Rows[locationInArray].Cells[0]; }

    C# question csharp database com data-structures
  • Login

  • Don't have an account? Register

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