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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
F

franz pilgerstorfer

@franz pilgerstorfer
About
Posts
6
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • SqlConnection open despite no service
    F franz pilgerstorfer

    Hi! I am working on a desktop application in C#. I'd like to show a small icon whether the user has still access to the database or not. Therefore I try to open a connection periodically (timer tick event every 10 sec). When I tested this application something strange happened 1) sql service not running -> I started application -> con.open fails -> catch block -> show disconnect icon 2) i started sql service -> con.open works -> show connect icon 3) i stopped sql service -> con.open STILL works??? -> no exception???? Below you can see my code.

    Thread t = new Thread(delegate()
    {
    SqlConnection con = null;

                try
                {
                    string conStr = "CONNECTIONSTRING GOES HERE"; 
                    con = new SqlConnection(conStr);
                    con.Open();
                    datenbankStatus(true); // raise event - show connect icon
                }
                catch (Exception ex)
                {
                    datenbankStatus(false);  // raise event - show disconnect icon
                }
                finally
                {
                    if (con != null && con.State == System.Data.ConnectionState.Open) con.Close();
                }
            });
            t.IsBackground = true;
            t.Start();
    

    Any help would be great!! Thx in advance

    C# database csharp help question

  • Deployment WinForm, SqlExpress, DB
    F franz pilgerstorfer

    Thanks that worked great for me. I modified the installer class to show a form. This form will retrieve any information that I need!

    C# database sysadmin help question workspace

  • Browser Close
    F franz pilgerstorfer

    don't use " - use ' instead if this doesn't help - post the complete event-handler and I will have a look on it franz

    C# tutorial question

  • Browser Close
    F franz pilgerstorfer

    Use the click-Event handler of your ?button? and add the following lines of code

    // Event-Handler
    Response.Write("window.close();");

    hope this helps Franz

    C# tutorial question

  • Attaching database
    F franz pilgerstorfer

    Hi Right-click your project and add a new installer class. Within your installer class add following code

    Public Overrides Sub Install(ByVal stateSaver As \_
      System.Collections.IDictionary)
    
        MyBase.Install(stateSaver)
    
        Try
            ' Creates the database.
            ExecuteSql("master", "CREATE DATABASE dbTest")
    
            ' Creates the tables.
            ExecuteSql(strDBName, "CREATE TABLE .....")
    
        Catch ex As Exception
            ' Reports any errors and abort.
        End Try   
    
        
    End Sub
    

    I found this code in the net. Although it is written in vb.net it may help you. Franz

    C# database sysadmin sql-server

  • Deployment WinForm, SqlExpress, DB
    F franz pilgerstorfer

    I am having some serious problems using the built-in setup project in VS2005. During installation users can check if they want a client programm installation, a client installation including database (and database server) or only database (including database server). Depending on what the user chooses I'd like to show a different setup dialog. i.e. user chooses client -> install -> ready user chooses client incl. database -> show dialog with textboxes for servername/databasename Is it possible to include a user-defined customizable dialog in the setup project? Is it possible to define different "ways" in a setup project? (on a) show this dialogue, on b) show another dialogue) Thank you for your help!

    C# database sysadmin help question workspace
  • Login

  • Don't have an account? Register

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