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
  1. Home
  2. General Programming
  3. C#
  4. toolStripProgressBar & SQL [modified]

toolStripProgressBar & SQL [modified]

Scheduled Pinned Locked Moved C#
databasecsharptutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    shopi30
    wrote on last edited by
    #1

    Hello everybody. Someone know how show on toolStripProgressBar the progress at retrive data from SQL Query? Example: SQL Structure: CREATE TABLE [student](     [student_id] INT NOT NULL IDENTITY(1,1),     [student_name] VARCHAR(50) NOT NULL,     [student_lastname] VARCHAR(70) NOT NULL,     [student_age] TINYINT NOT NULL,     [student_since] SMALLDATETIME NOT NULL DEFAULT GETDATE(),     [student_grade] TINYINT NOT NULL,     [student_active] BIT NOT NULL DEFAULT 1,     PRIMARY KEY( [student_data_id] ) ) CREATE TABLE [class](     [class_id] SMALLINT NOT NULL IDENTITY(1,1),     [class_name] VARCHAR(50) NOT NULL,     [class_acive] BIT NOT NULL DEFAULT 1,     PRIMARY KEY( [class_id] ) ) CREATE TABLE [class_by_student](     [class_id] REFERENCES [class] ( [class_id] ),     [student_id] REFERENCES [student]( [student_id] ),     PRIMARY KEY( [class_id], [student_id] ) ) C# Code: using System; using System.Data; using System.Data.SqlClient; using System.Windows.Forms; using System.Thread; public class Form1 : Form {     private System.ComponentModel.IContainer components = null;     private StatusStrip sb;     private ToolStripProgressBar pb;     DataGridView dg;     Thread Thread4LoadData;     public Form1()     {         this.makeForm();     }     public makeForm()     {         this.sb = new StatusStrip();         this.pb = new ToolStripProgressBar();         this.dg = new DataGridView();         ((System.ComponentModel.ISupportInitialize)(this.dg)).BeginInit();         this.sb.SuspendLayout();         this.SuspendLayout();         //status bar         th

    C 1 Reply Last reply
    0
    • S shopi30

      Hello everybody. Someone know how show on toolStripProgressBar the progress at retrive data from SQL Query? Example: SQL Structure: CREATE TABLE [student](     [student_id] INT NOT NULL IDENTITY(1,1),     [student_name] VARCHAR(50) NOT NULL,     [student_lastname] VARCHAR(70) NOT NULL,     [student_age] TINYINT NOT NULL,     [student_since] SMALLDATETIME NOT NULL DEFAULT GETDATE(),     [student_grade] TINYINT NOT NULL,     [student_active] BIT NOT NULL DEFAULT 1,     PRIMARY KEY( [student_data_id] ) ) CREATE TABLE [class](     [class_id] SMALLINT NOT NULL IDENTITY(1,1),     [class_name] VARCHAR(50) NOT NULL,     [class_acive] BIT NOT NULL DEFAULT 1,     PRIMARY KEY( [class_id] ) ) CREATE TABLE [class_by_student](     [class_id] REFERENCES [class] ( [class_id] ),     [student_id] REFERENCES [student]( [student_id] ),     PRIMARY KEY( [class_id], [student_id] ) ) C# Code: using System; using System.Data; using System.Data.SqlClient; using System.Windows.Forms; using System.Thread; public class Form1 : Form {     private System.ComponentModel.IContainer components = null;     private StatusStrip sb;     private ToolStripProgressBar pb;     DataGridView dg;     Thread Thread4LoadData;     public Form1()     {         this.makeForm();     }     public makeForm()     {         this.sb = new StatusStrip();         this.pb = new ToolStripProgressBar();         this.dg = new DataGridView();         ((System.ComponentModel.ISupportInitialize)(this.dg)).BeginInit();         this.sb.SuspendLayout();         this.SuspendLayout();         //status bar         th

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      You can't. Your query starts, and it ends, there's no step in between where you get feedback from the db or, ( in a single threaded app ) where your code does anything at all.

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

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