Solved

What is the best way to connect to a SQL 2000 Database.

Posted on 2004-10-19
2
214 Views
Last Modified: 2010-04-24
I am building a project to give end users access to a SQL database so that they can do updates, inserts, and ect..

I am use to writing ASP and not as familiar with VB.net.  Usually I connect using ADODB object.  But I know that VB.net give you the option to connect with OdbcConnection or OleDbConnection object.

My project has multiple forms and is using a lot of Stored Procedure and some inline SQL in my code.

So what would be the best way to connect and be able to use that connection through out the project?  And if using the VB connection object is the best way to go, then what would be a good link or resource on using these objects?

I hope that this is not too much of a newbie question.

Thanks for any advice.
0
Comment
Question by:GabicusC
2 Comments
 
LVL 4

Accepted Solution

by:
eozz_2000 earned 300 total points
ID: 12352990
Well, I'd do the following:

-Create a new instance of a sqlConnection object in a module of your project.
-In the first form of your proyect you open the connection.
-Whenever you are going to use a connection, set the connection property of the objects to your module connection.
0
 
LVL 19

Expert Comment

by:arif_eqbal
ID: 12355052
Use SQLConnection object it is fater compared to ODBC and OLEDB because it natively connects to SQL Server

Look at

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsse/html/VWD_SSE.asp

0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question