Fast Forward Your Business – Utveckla din verksamhet

Varför inte ta chansen och utveckla dig och dina möjligheter både som anställd och som entreprenör/företagare.

Ta och titta närmare på den här länken:
http://www.cvent.com/d/q4qrr1?RefID=P2

Det är ett event i Stockholm i 17 september, och handlar om hur man får sitt företag/verksamhet att gå framåt. Även om man inte är företagare så är det ett mycket intressant event.

SPO12 – Inloggning till projektet

Ett exempel på hur man kan göra en inloggningsverifikation

public void LoggOn(string theUID, string thePWD)
{
try
{
    // 1. Instantiate the connection
    SqlConnection conn = new SqlConnection(@"server=.\SQLExpress;"
        + "database=spo12;" + "integrated Security=SSPI;");
    SqlDataReader rdr = null;
    try
    {
        string sqlQuery = "SELECT * "
            +" FROM dbo.Users "
            +" WHERE username = '" + theUID + "' AND pwd='" + thePWD + "'"
        // 2. Open the connection
        conn.Open();
        // 3. Pass the connection to a command object
        SqlCommand cmd = new SqlCommand(, conn);
        // 4. Use the connection
        // get query results
        rdr = cmd.ExecuteReader();

        if (rdr.HasRows) { }
    }
    catch (Exception myExeption)
    {
        MessageBox.Show("Huston!!\n We got problems\n" + myExeption.Message);
    }
    finally
    {
        // close the reader
        if (rdr != null)
        {
            rdr.Close();
        }

        // 5. Close the connection
        if (conn != null)
        {
            conn.Close();
        }
    }
}