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
O

O Phil

@O Phil
About
Posts
9
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • SELECT last date from database column entries !
    O O Phil

    Try

    cmd = New SqlCommand("SELECT [Closing Date] FROM client_details WHERE [Closing Date] <= @selectedDate", con);

    Dim param As New SqlParameter("selectedDate", DateTime.Parse(textbox.Text, CultureInfo.InvariantCulture));
    cmd.Parameters.Add(param);

    Database database tutorial csharp css

  • Hiding command prompt while running an .bat file?
    O O Phil

    Use @echo off on the first line of your bat file.

    C# question

  • Class with comments that say "Do not use"
    O O Phil

    I think there is an ObsoleteAttribute to handle this situation, isn't it ?

    The Weird and The Wonderful visual-studio

  • smart device Forms-Database
    O O Phil

    Hi, When you use the SqlCe Connection and Command object, you don't need to use your dataset anymore. If you have MSDN installed, you can check the use of these objects (particularly the SqlCeCommand object, since this is the one that actually does the request). So :

    {...}
    cmd.Parameters.Add(pass);
    int count = cmd.ExecuteScalar();
    if (count == 1)
    {
    MessageBox.Show("Authentification réussie");
    MenuP m = new MenuP();
    m.Show();
    }
    else
    MessageBox.Show("Login ou mot de passe incorrect veuillez réessayer");

    Here's the idea. Courage ! ;)

    C# help csharp database com question

  • smart device Forms-Database
    O O Phil

    I was just observing that "Text property is already a string, so you don't need the ToString() method here." ;)

    C# help csharp database com question

  • smart device Forms-Database
    O O Phil

    string s1 = textBox1.Text.ToString();
    string s2 = textBox2.Text.ToString();

    Text property is already a string, so you don't need the ToString() method here. So :

    string s1 = textBox1.Text;
    string s2 = textBox2.Text;

    is sufficient.

    SqlCeConnection cnx = new SqlCeConnection("..."); // Replace ... by the right connexion string
    string req = "SELECT * FROM Connexion WHERE Login = @login AND MotPasse = @pass";
    SqlCeCommand cmd = new SqlCeCommand(req, cnx);
    SqlCeParameter login = new SqlCeParameter("login", s1);
    cmd.Parameters.Add(login);
    SqlCeParameter pass = new SqlCeParameter("pass", s2);
    cmd.Parameters.Add(pass);
    ...

    Here's the general idea. Hope it'll be useful.

    modified on Tuesday, April 13, 2010 10:54 AM

    C# help csharp database com question

  • south african phone number validation
    O O Phil

    Hi, First of all, regular expression must be defined using a string, so you have to instanciate it that way :

    Regex rx = new Regex("((?:\\+27|27)|0)(72|82|73|83|74|84)(\\d{7})");

    Moreover, as OriginalGriff told you, consider using a tool like Expresso to build and test your regular expressions. Regards.

    C# regex help tutorial question

  • Re: Calling an event in a different namespace
    O O Phil

    The first error tells you you try to use a method with a wrong signature. The second error tells you the method you're trying to use is not static (i.e. you can't access it from its class, you have to use an instance of the panelMasterList to call the method). So, if your main form holds an instance of panelMasterList, use the variable referencing this instance to call the method :

    myPanelMasterList.contextDeleteMasterList_Click(sender, e);

    Or make the method static in the panelMasterList Class :

    public static void contextDeleteMasterList_Click(object sender, EventArgs e) {...}

    But, depending on how you organized your application, there could be some more issues. This is only what I can think of regarding the informations you provided. Kind regards.

    C# help question

  • date_time problum in java??
    O O Phil

    I would say : you shouldn't name the class as Date, since it can be confusing with the Date valuetype.

    ...

    class DateTest {

    ...

    }

    Java question java learning
  • Login

  • Don't have an account? Register

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