Click here to Skip to main content
15,893,190 members
Home / Discussions / C#
   

C#

 
AnswerRe: Usings for "ManagementClass" in Visual C# 2010 [modified some more] Pin
Luc Pattyn30-Apr-11 2:46
sitebuilderLuc Pattyn30-Apr-11 2:46 
GeneralRe: Usings for "ManagementClass" in Visual C# 2010 Pin
rms12330-Apr-11 2:54
professionalrms12330-Apr-11 2:54 
AnswerRe: Usings for "ManagementClass" in Visual C# 2010 Pin
Luc Pattyn30-Apr-11 2:59
sitebuilderLuc Pattyn30-Apr-11 2:59 
GeneralRe: Usings for "ManagementClass" in Visual C# 2010 Pin
rms12330-Apr-11 3:20
professionalrms12330-Apr-11 3:20 
GeneralRe: Usings for "ManagementClass" in Visual C# 2010 Pin
PIEBALDconsult30-Apr-11 3:37
mvePIEBALDconsult30-Apr-11 3:37 
GeneralRe: Usings for "ManagementClass" in Visual C# 2010 Pin
Luc Pattyn30-Apr-11 4:08
sitebuilderLuc Pattyn30-Apr-11 4:08 
GeneralRe: Usings for "ManagementClass" in Visual C# 2010 Pin
PIEBALDconsult30-Apr-11 4:59
mvePIEBALDconsult30-Apr-11 4:59 
AnswerRe: Usings for "ManagementClass" in Visual C# 2010 Pin
Luc Pattyn30-Apr-11 5:09
sitebuilderLuc Pattyn30-Apr-11 5:09 
QuestionProgram With Multi language support Pin
Arunkumar.Koloth29-Apr-11 17:32
Arunkumar.Koloth29-Apr-11 17:32 
AnswerRe: Program With Multi language support Pin
OriginalGriff29-Apr-11 20:54
mveOriginalGriff29-Apr-11 20:54 
AnswerRe: Program With Multi language support Pin
PIEBALDconsult1-May-11 3:13
mvePIEBALDconsult1-May-11 3:13 
GeneralRe: Program With Multi language support Pin
Arunkumar.Koloth1-May-11 6:31
Arunkumar.Koloth1-May-11 6:31 
GeneralRe: Program With Multi language support Pin
PIEBALDconsult1-May-11 17:28
mvePIEBALDconsult1-May-11 17:28 
Questionc# Pin
mansingh3529-Apr-11 6:25
mansingh3529-Apr-11 6:25 
AnswerRe: c# Pin
Keith Barrow29-Apr-11 6:44
professionalKeith Barrow29-Apr-11 6:44 
GeneralRe: c# Pin
OriginalGriff29-Apr-11 8:25
mveOriginalGriff29-Apr-11 8:25 
GeneralRe: c# Pin
Keith Barrow29-Apr-11 8:34
professionalKeith Barrow29-Apr-11 8:34 
GeneralRe: c# Pin
SledgeHammer0129-Apr-11 8:42
SledgeHammer0129-Apr-11 8:42 
AnswerRe: c# Pin
PIEBALDconsult29-Apr-11 17:25
mvePIEBALDconsult29-Apr-11 17:25 
AnswerRe: c# Pin
ambarishtv29-Apr-11 22:51
ambarishtv29-Apr-11 22:51 
do it like this.. Smile | :)

using System;
using System.Collections.Generic;
using System.Text;
using System.Data.OleDb;
namespace Access
{
   public class Connection
    {
        private string getConnectionString()
        {
            return "connetionString";
        }
 
        public static void ExecuteCommand(string command)
        {
            OleDbConnection con;
            OleDbCommand com;
            try
            {
                con = new OleDbConnection(getConnectionString());
                con.Open();
                com = new OleDbCommand(command);
                com.ExecuteNonQuery();
            }
            catch (Exception ex)
            {
                //ex shows exception
            }
            finally
            {
                con.Close();
            }
        }
    }

//Call Connection Method
public void MyMethord()<br />
{<br />
Connection.ExecuteCommand("command write here");<br />
}

-ambarish-

AnswerRe: c# Pin
Prasanta_Prince30-Apr-11 7:14
Prasanta_Prince30-Apr-11 7:14 
QuestionFile access permissions in program files folder Pin
lukeer29-Apr-11 3:46
lukeer29-Apr-11 3:46 
AnswerRe: File access permissions in program files folder Pin
dan!sh 29-Apr-11 5:26
professional dan!sh 29-Apr-11 5:26 
AnswerRe: File access permissions in program files folder Pin
Luc Pattyn29-Apr-11 8:09
sitebuilderLuc Pattyn29-Apr-11 8:09 
GeneralRe: File access permissions in program files folder Pin
lukeer1-May-11 21:04
lukeer1-May-11 21:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.