|
|
#1 | |
|
Registered User
Join Date: Mar 2009
Posts: 1
|
Two questions:
1. How can I execute a SQL statement in a windows project (the database i attached to the project). and 2. How do I make windows MDI children of an MDI main form? |
|
|
|
|
|
|
#2 | |
|
*BANNED*
Join Date: Jan 2008
Posts: 184
|
I don't know exactly what it means to "attach" a database to a project, but the idiom is to establish a connection to the db and then build up and execute your query, and then process the result set. I believe Microsoft offers ADO for that sort of thing.
|
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Jul 2004
Posts: 97
|
You should really use entities framework or Linq to SQL if you develop for .net 3.5 (and maybe WPF while you're at it).
If not, I believe there is a designer where you can input SQL and execute it. It's been a long time since I made windows forms and ado.net projects though. |
|
|
|
|
|
#4 | |
|
Registered User
Join Date: Mar 2004
Posts: 15,486
|
in order to execute SQL statements you need to use one of two things.
you either need to use a reference to a .dll file for databases such as MySQL or something similar, or you can use MS's builtin ADO statements. http://en.wikipedia.org/wiki/ActiveX_Data_Objects ADO is very easy to use. i have also used the MySQL extension and that is very easy as well. you just need to have the MySQL service running. |
|
|
|
|
|
|
#5 |
|
Spelling Expert?!?
Join Date: Oct 2003
Location: Indy, IN
Posts: 812
|
Code:
_Login = new LogIn();
_Login.MdiParent = this;
_Login.WindowState = FormWindowState.Maximized;
_Login.UserLogIn += this.LogUserIn;
if (ActiveMdiChild != _LuaFinder)
{
if (ActiveMdiChild != null)
{
ActiveMdiChild.Hide();
}
_LuaFinder.Show();
}
Also if you are using 3.5, open up google and look up LINQ, do not pass go, do not collect $200. When you generate your DataContext object it should auto create the connection string for you.
__________________
-"Aqua 2": Water Cooled Intel i7 960, 12 GB DDR3 PC 12800, 3x Intel X-25-M 80 GB SSD RAID 0, SATA 1.5TB WD, EVGA GeForce GTX 470 Supper Clocked Water Cooled, ASUS P6X58D, Corsair 800D w/ Koolance cooling |
|
|
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| NVIDIA Maximus Fires Up Visual Effects In Men in Black 3 | News | Latest Tech And Game Headlines | 0 | 06-26-12 06:00 PM |
| Google Blockly: New Visual Programming Language | News | Latest Tech And Game Headlines | 0 | 06-13-12 06:00 AM |
| A Second Studio Of Ex-STALKER Devs Appears | News | Latest Tech And Game Headlines | 0 | 06-04-12 06:10 AM |
| Rumour: Ex-STALKER devs form Union Studio, developing Fallout/Rage inspired shooter | News | Latest Tech And Game Headlines | 0 | 06-01-12 12:10 PM |
| nvidia: Very clear visual depiction of what the @ptscientists set out to achieve #gtc | News | Latest Tech And Game Headlines | 0 | 05-17-12 10:40 PM |