Problem solve Get help with specific problems with your technologies, process and projects.

Query database from VB app or SQL Server?

I am looking at writing a VB program to extract information out of a SQL Server. I guess im really looking for some advice. Is it better to set up all the SQL queries/views using SQL Server or just to query the database from within the VB program? If the fisrt way is the best, how do I go about doing this?

The recommended approach is to wrap all access to data inside stored procedures and then call the procs from your application. This requires permissions on only the stored procedures and NOT the underlying tables which gives you a much more secure application. It also makes your application more dynamic, because as long as the interfaces to the stored procedures don't change, you don't have to modify your application.


For More Information

Dig Deeper on Microsoft SQL Server Installation

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.