954,514 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Sql queries in visual studio

Hi there,
I have some questions regarding insert update and select queries in VS 2008. When writing select update and insert queries where should I write them. Is it in a class in visual studio or is it in the database as a stored procedure or something else. At the moment I am using the mdf file as the temporary database file how can I write stored procedures and call then in the visual studio class.

thanxxxxxx

judithSampathwa
Posting Pro in Training
453 posts since May 2010
Reputation Points: 8
Solved Threads: 0
 

I'm sure there are better ways to do this, but here's a short tutorial I wrote a couple of weeks ago on databases .

Hope this helps

Duki
Nearly a Posting Virtuoso
1,475 posts since Jun 2006
Reputation Points: 817
Solved Threads: 32
 

You can add stored procedures from VS if you open the DB in the Server Explorer (View Menu - Server Explorer).
If your DB is not already in the window then you will have to open it using the "Connect to Database" button at the top of the window.
Once open, you should be able to find a "Strored Procedures" folder. Right click and select "Add New Stored Procedure".
You will need to know SQL to write the procedure. That is too much for me here.
Maybe someone else could provide some suitable links that will help.

nick.crane
Nearly a Posting Virtuoso
1,230 posts since Feb 2010
Reputation Points: 375
Solved Threads: 187
 
Duki
Nearly a Posting Virtuoso
1,475 posts since Jun 2006
Reputation Points: 817
Solved Threads: 32
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: