Click here to Skip to main content
15,905,419 members
Home / Discussions / Database
   

Database

 
GeneralSQL server timeout expired Pin
Imtiaz Murtaza24-Jul-03 18:59
Imtiaz Murtaza24-Jul-03 18:59 
GeneralRe: SQL server timeout expired Pin
Mike Dimmick29-Jul-03 3:05
Mike Dimmick29-Jul-03 3:05 
Generalprocedure Pin
aquaman22-Jul-03 16:46
aquaman22-Jul-03 16:46 
GeneralPrimary Key Pin
Anthony988722-Jul-03 9:57
Anthony988722-Jul-03 9:57 
GeneralRe: Primary Key Pin
Chris Meech23-Jul-03 2:45
Chris Meech23-Jul-03 2:45 
GeneralRe: Primary Key Pin
Jon Hulatt24-Jul-03 5:36
Jon Hulatt24-Jul-03 5:36 
Generalglobal DataSet Pin
haimon1522-Jul-03 8:19
haimon1522-Jul-03 8:19 
GeneralRe: global DataSet Pin
Arjan Einbu27-Jul-03 7:49
Arjan Einbu27-Jul-03 7:49 
This is not really an SQL/ADO/ADO.NET question, but anyway...

There are a couple of approaches:
1. Declare your DataSet as a public in your MDI parent. In your child windows you use the this.MdiParent property to access your parent window.
Sample code:
<br />
public class MyChildForm : System.Windows.Forms.Form<br />
{<br />
   private DataSet myDataset<br />
   {<br />
      get<br />
      {<br />
         MyParentForm mdiParent = this.MdiParent;<br />
         return mdiParent.myDataset;<br />
      }<br />
   }<br />
}<br />
<br />
public class MyParentForm : System.Windows.Forms.Form<br />
{<br />
   private DataSet myDataset;<br />
}

Now, in your MdiChild you access your dataset by using the MyDataSet property.

You can now insert the abstract keyword in the definition of MyChildForm, and make all your actual mdi child forms inherit the MyChildForm abstract class instead of System.Windows.Forms.Form. Then the MyDataSet property will be available withot anymore work...

2. You could create a class with a static DataSet member... (Or a singleton class)
Then that dataset would be available all over the application...
Questionhow to get parameters into table Pin
don7cry21-Jul-03 3:12
don7cry21-Jul-03 3:12 
AnswerRe: how to get parameters into table Pin
Nino_121-Jul-03 18:33
Nino_121-Jul-03 18:33 
GeneralRe: how to get parameters into table Pin
don7cry22-Jul-03 0:48
don7cry22-Jul-03 0:48 
GeneralRe: how to get parameters into table Pin
Arjan Einbu22-Jul-03 1:32
Arjan Einbu22-Jul-03 1:32 
GeneralRe: how to get parameters into table Pin
don7cry22-Jul-03 4:34
don7cry22-Jul-03 4:34 
GeneralSearch the database; Pin
Bo Hunter20-Jul-03 12:17
Bo Hunter20-Jul-03 12:17 
GeneralRe: Search the database; Pin
Nino_120-Jul-03 15:57
Nino_120-Jul-03 15:57 
GeneralRe: Search the database; Pin
Ian Darling21-Jul-03 8:37
Ian Darling21-Jul-03 8:37 
GeneralRe: Search the database; Pin
Rein Hillmann23-Jul-03 6:01
Rein Hillmann23-Jul-03 6:01 
GeneralRe: Search the database; Pin
Ian Darling23-Jul-03 6:14
Ian Darling23-Jul-03 6:14 
GeneralAssign One ConnObj Pointer to another Pin
Johan_yo17-Jul-03 11:27
Johan_yo17-Jul-03 11:27 
GeneralCrystal Reports question Pin
lustuyck16-Jul-03 22:09
lustuyck16-Jul-03 22:09 
GeneralHelp with first Stored Procedure Pin
totig16-Jul-03 6:14
totig16-Jul-03 6:14 
GeneralRe: Help with first Stored Procedure Pin
Ian Darling17-Jul-03 1:03
Ian Darling17-Jul-03 1:03 
GeneralRe: Help with first Stored Procedure Pin
basementman17-Jul-03 5:05
basementman17-Jul-03 5:05 
GeneralAllow Zero Length Pin
Anthony988716-Jul-03 5:43
Anthony988716-Jul-03 5:43 
GeneralRe: Allow Zero Length Pin
Giles16-Jul-03 6:04
Giles16-Jul-03 6:04 

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.