Ask the Expert

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?

    Requires Free Membership to View

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

This was first published in August 2002

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: