ODBC question

D

Dr. Indera

hi,

this may be a bit long, but i want to make sure i explain my questions. (aka, not real experienced
with visual studio.net)

i'm using visual studio.net 2003 (visual basic.net and crystal reports.net in particular).

i know that you have to have an odbc connection for the database that you will use with your
application.

what i don't understand is if you need to just have the "type" of data source - like excel, access,
foxpro set up on the first tab (user dsn) of the odbc data source administrator dialog box.

by default, when windows is installed are certain data source types set up automatically?

i ask because i'm walking through some tutorials for crystal.net and one had me set up a connection
on the system dsn tab and the actual ms access database name is there and the other tutorial did not
have me go into this odbc data source dialog box at all, yet i am still able to get to the database
when creating the reports.

is there a benefit to setting up the database on the system dsn tab? if so, what is it?

thanks
indera
 
P

Paul Clement

¤ hi,
¤
¤ this may be a bit long, but i want to make sure i explain my questions. (aka, not real experienced
¤ with visual studio.net)
¤
¤ i'm using visual studio.net 2003 (visual basic.net and crystal reports.net in particular).
¤
¤ i know that you have to have an odbc connection for the database that you will use with your
¤ application.
¤
¤ what i don't understand is if you need to just have the "type" of data source - like excel, access,
¤ foxpro set up on the first tab (user dsn) of the odbc data source administrator dialog box.
¤
¤ by default, when windows is installed are certain data source types set up automatically?
¤
¤ i ask because i'm walking through some tutorials for crystal.net and one had me set up a connection
¤ on the system dsn tab and the actual ms access database name is there and the other tutorial did not
¤ have me go into this odbc data source dialog box at all, yet i am still able to get to the database
¤ when creating the reports.
¤
¤ is there a benefit to setting up the database on the system dsn tab? if so, what is it?

About the only benefits are that you remove the actual connection information from your code and
it's easier to change data source connection information on the fly.

DSNs are holdovers from the ODBC era. Connections nowadays are typically DSN-less, using OLEDB and
the native .NET providers, which can be complimented using UDL or configuration file based
connection information techniques.


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
D

Dr. Indera

hi paul,

i thank you for your reply, but because i'm on the new side to this, i don't understand what you said.
if one opens the dsn dialog box and sees the microsoft access data source type listed, do you still have
to create a connection to the actual database that you will use in your visual basic.net project?

thanks
indera
 
P

Paul Clement

¤ hi paul,
¤
¤ i thank you for your reply, but because i'm on the new side to this, i don't understand what you said.
¤ if one opens the dsn dialog box and sees the microsoft access data source type listed, do you still have
¤ to create a connection to the actual database that you will use in your visual basic.net project?
¤

I guess the short answer is no. You can (and should) create connections to a Microsoft Access
database without using a DSN.

Typically you don't use a DSN for a Microsoft Access database because that implies you're using
ODBC. The preferred database provider for Microsoft Access is Jet OLEDB.

You can use the Server Explorer in VS.NET to create connections to a Microsoft Access database using
Jet OLEDB Provider.


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top