adrianmcg's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
New Members
Active Posts:
15 (0.02 per day)
Joined:
06-December 12
Profile Views:
889
Last Active:
User is offline Aug 10 2014 06:36 AM
Currently:
Offline

Previous Fields

Country:
GB
OS Preference:
Windows
Favorite Browser:
Chrome
Favorite Processor:
Intel
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
0
Icon   adrianmcg has not set their status

Posts I've Made

  1. In Topic: Connection to SQL Database. Needs initializing

    Posted 8 Aug 2014

    Thanks for changing that.
    It is a desktop app not a web app.
    I tried using a confiurationManager class however the connection string could not be initialized.
    I am going to use the Integrated Security.
  2. In Topic: Connection to SQL Database. Needs initializing

    Posted 8 Aug 2014

    I just fixed it. I assumed the new sql connection was not taking the connection string so I created a private string for the connectionstring so it could be used for all sql connections.

    Is the the best way of doing it. Here is my code i used.

           private string constr()
           {
              return "server=SomeServer; uid=sa; password=SomePassword; database=SomeDatabase";
    
           }
            
    
    
            public int ExecuteSQL(string Query) {
               
                SqlConnection cxn = new SqlConnection(constr());
    
    
                cxn.Open();
                DataTable dt = new DataTable();
                SqlCommand cmd = new SqlCommand(Query, cxn);
    
                SqlDataAdapter da = new SqlDataAdapter(cmd);
                da.Fill(dt);
    
               
    
    
                return cmd.ExecuteNonQuery();
    
    
            }
    
    
  3. In Topic: Connection to SQL Database. Needs initializing

    Posted 8 Aug 2014

    the error occurs on
    return cmd.ExecuteNonQuery(); 
    


    it is an invalidoperationsexception
  4. In Topic: Connection to SQL Database. Needs initializing

    Posted 7 Aug 2014

    I keep getting error "The ConnectionString property has not been initialized"
  5. In Topic: Adding 2 values that together as decimals in c# asp.net

    Posted 13 Dec 2012

    text = text.Replace("", "");
    

    This works for removing .

    I am not sure how to change this to add to the pack value for total.

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

adrianmcg hasn't added any friends yet.

Comments

adrianmcg has no profile comments yet. Why not say hello?