Go Back   nV News Forums > Software Forums > Software Development

Newegg Daily Deals

Thread Tools
Old 03-22-09, 06:17 PM   #1
Registered User
Join Date: Mar 2009
Posts: 1
Question Visual Studio

Two questions:
1. How can I execute a SQL statement in a windows project (the database i attached to the project).
2. How do I make windows MDI children of an MDI main form?
ctemes is offline   Reply With Quote
Old 03-22-09, 06:51 PM   #2
Join Date: Jan 2008
Posts: 184
Default Re: Visual Studio

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.
Zhivago is offline   Reply With Quote
Old 03-23-09, 08:58 AM   #3
Registered User
Join Date: Jul 2004
Posts: 97
Default Re: Visual Studio

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.
yehuda is offline   Reply With Quote
Old 03-30-09, 06:17 PM   #4
Join Date: Mar 2004
Posts: 15,486
Default Re: Visual Studio

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.


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.
ViN86 is offline   Reply With Quote
Old 04-03-09, 10:52 AM   #5
Spelling Expert?!?
thor1182's Avatar
Join Date: Oct 2003
Location: Indy, IN
Posts: 812
Default Re: Visual Studio

_Login = new LogIn();
            _Login.MdiParent = this;
            _Login.WindowState = FormWindowState.Maximized;
            _Login.UserLogIn += this.LogUserIn;
  if (ActiveMdiChild != _LuaFinder)
                if (ActiveMdiChild != null)
I think is something close to what you are looking for the midi stuff. Thats with 3.5, and I don't know how different it is in the older frameworks (and I don't know if what I am doing is "correct", but it works).

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
thor1182 is offline   Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
NVIDIA Maximus Fires Up Visual Effects In Men in Black 3 News Archived News Items 0 06-26-12 06:00 PM
Google Blockly: New Visual Programming Language News Archived News Items 0 06-13-12 06:00 AM
A Second Studio Of Ex-STALKER Devs Appears News Archived News Items 0 06-04-12 06:10 AM
Rumour: Ex-STALKER devs form Union Studio, developing Fallout/Rage inspired shooter News Archived News Items 0 06-01-12 12:10 PM
nvidia: Very clear visual depiction of what the @ptscientists set out to achieve #gtc News Archived News Items 0 05-17-12 10:40 PM

All times are GMT -5. The time now is 06:03 PM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.