Results 1 to 3 of 3

Thread: Namespace Error

  1. #1

    Thread Starter
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861

    Namespace Error

    I am receiving this error:
    The type or namespace name 'debug' could not be found (are you missing a using directive or an assembly reference?)
    here is my code:
    Code:
    using System;
    using System.Drawing;
    using System.Collections;
    using System.ComponentModel;
    using System.Windows.Forms;
    using System.Data;
    using System.Data.SqlClient;
    using System.Diagnostics;
    
    private void Form1_Load(object sender, System.EventArgs e)
    		{
    			SqlConnection conn = new SqlConnection("Data Source=webappserver; Integrated Security=SSPI; Initial Catalog=pubs");
    			SqlCommand  cmd = new SqlCommand("SELECT * FROM jobs ORDER BY job_desc", conn);
    			try
    			{    	
    				conn.Open();
    		
    				SqlDataReader myReader = cmd.ExecuteReader();
    	
    				while (myReader.Read())
    				{
    					cbo1.Items.Add(myReader["job_desc"]);
    				}
    				
    				myReader.Close();
    				conn.Close();
    			}
    			catch(Exception)
    			{
    				
    			}    
    		}
    
    		private void cbo1_SelectedIndexChanged(object sender, System.EventArgs e)
    		{
    			debug.write(sender, e);
    		}
    anyone know why I am receiving this error, even though I am using the System.Diagnostics namespace? I'm using 1.1 framework.
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Upper case them .
    Code:
    Debug.Write (sender,e);

  3. #3

    Thread Starter
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861
    hahahaha!...Excuse me now, while I go get a job in retail!
    Thanks BTW!
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width