Click here to Skip to main content
15,884,978 members
Home / Discussions / C#
   

C#

 
AnswerRe: What's the most easy-to-read way of initializing a string-int-pair array? Pin
Gerry Schmitz25-Jul-20 7:30
mveGerry Schmitz25-Jul-20 7:30 
AnswerRe: What's the most easy-to-read way of initializing a string-int-pair array? Pin
BillWoodruff27-Jul-20 17:25
professionalBillWoodruff27-Jul-20 17:25 
QuestionHow to convert C++ 2005 project to 2016 Pin
Sheryl Brock23-Jul-20 4:14
Sheryl Brock23-Jul-20 4:14 
AnswerRe: How to convert C++ 2005 project to 2016 Pin
OriginalGriff23-Jul-20 4:18
mveOriginalGriff23-Jul-20 4:18 
SuggestionRe: How to convert C++ 2005 project to 2016 Pin
Richard Deeming23-Jul-20 6:49
mveRichard Deeming23-Jul-20 6:49 
Questionclass to open its database Pin
ago248621-Jul-20 0:17
ago248621-Jul-20 0:17 
GeneralRe: class to open its database Pin
Richard MacCutchan21-Jul-20 0:46
mveRichard MacCutchan21-Jul-20 0:46 
GeneralRe: class to open its database Pin
ago248621-Jul-20 0:55
ago248621-Jul-20 0:55 
C#
public partial class Form1 : Form
    { 

        public Form1()
        {
            InitializeComponent();

        }

 ConnectionDB d = new ConnectionDB();

    using (OleDbCommand cmbox = d.sql_con.CreateCommand())
                {
                    cmbox.CommandText = "SELECT Code_article FROM Catalogue";
                    d.CONNECTER();// i have an error here
                    d.DR = cmbox.ExecuteReader();

                    try
                    {
                        while (d.DR.Read())
                        {
                            CmbRef_Produit.Items.Add(d.DR["Code_article"]).ToString();
                        }

                        //si le textbox est vide
                        if (string.IsNullOrWhiteSpace(CmbRef_Produit.Text ))
                        {
                            // Message box

                            Lbl_affich_TxtQteStock.Text = "";
                            Lbl_Affich_Designation.Text = "";
                            Lbl_Affich_PrixUnitaire.Text = "";
                        }

                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.ToString());

                        d.DECONNECTER();

                    }
                }

            }

}

GeneralRe: class to open its database Pin
Richard MacCutchan21-Jul-20 1:13
mveRichard MacCutchan21-Jul-20 1:13 
GeneralRe: class to open its database Pin
ago248621-Jul-20 1:22
ago248621-Jul-20 1:22 
GeneralRe: class to open its database Pin
ago248621-Jul-20 1:32
ago248621-Jul-20 1:32 
AnswerRe: class to open its database Pin
OriginalGriff21-Jul-20 1:19
mveOriginalGriff21-Jul-20 1:19 
GeneralRe: class to open its database Pin
ago248621-Jul-20 1:40
ago248621-Jul-20 1:40 
GeneralRe: class to open its database Pin
ago248621-Jul-20 5:59
ago248621-Jul-20 5:59 
QuestionCreating my own enhanced dos language Pin
Member 1270775219-Jul-20 5:30
Member 1270775219-Jul-20 5:30 
AnswerRe: Creating my own enhanced dos language Pin
Dave Kreskowiak19-Jul-20 6:09
mveDave Kreskowiak19-Jul-20 6:09 
AnswerRe: Creating my own enhanced dos language Pin
Richard MacCutchan19-Jul-20 6:42
mveRichard MacCutchan19-Jul-20 6:42 
AnswerRe: Creating my own enhanced dos language Pin
Gerry Schmitz19-Jul-20 7:39
mveGerry Schmitz19-Jul-20 7:39 
AnswerRe: Creating my own enhanced dos language Pin
OriginalGriff19-Jul-20 8:20
mveOriginalGriff19-Jul-20 8:20 
AnswerRe: Creating my own enhanced dos language Pin
Member 1270775219-Jul-20 9:26
Member 1270775219-Jul-20 9:26 
GeneralRe: Creating my own enhanced dos language Pin
Dave Kreskowiak19-Jul-20 10:14
mveDave Kreskowiak19-Jul-20 10:14 
GeneralRe: Creating my own enhanced dos language Pin
Member 1270775220-Jul-20 9:19
Member 1270775220-Jul-20 9:19 
GeneralRe: Creating my own enhanced dos language Pin
Dave Kreskowiak20-Jul-20 12:22
mveDave Kreskowiak20-Jul-20 12:22 
GeneralRe: Creating my own enhanced dos language Pin
Member 1270775221-Jul-20 2:15
Member 1270775221-Jul-20 2:15 
GeneralRe: Creating my own enhanced dos language Pin
Richard MacCutchan21-Jul-20 2:55
mveRichard MacCutchan21-Jul-20 2:55 

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.