Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Database Connectivity using DSN

Reply
Thread Tools

Database Connectivity using DSN

 
 
Niks
Guest
Posts: n/a
 
      12-22-2003
Hi,
I need to connect to SQL server Database using a System DSN. Can
anyone tell me how to connect to SQL Server using DSN in ASP.NET
(VB.Net). Using a Try Catch block.

Does anyone know how to create a "filename.DSN" file. I know how to
create a system DSN, but my N/W admin has asked me to create a DSN
file to send him. which would be a file name with ".DSN" extension, so
that he can place it on the server.

thanks in advance.
 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      12-22-2003
Why on earth would you want to use a System or File DSN to connect to a SQL
Server?!

First, a System or File DSN uses ODBC (Open Database Connectivity), which is
a wrapper for OLE DB (Object Linking and Embedding for Databases). This
means that your database connectivity will be as slow as possible. You have
2 other choices. One is to use OLE DB, which eliminates the wrapper of ODBC.
The other is to use the native SQL .Net classes (System.Data.SqlClient).
This is the fastest way to connect to a SQL Server with .Net.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Niks" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Hi,
> I need to connect to SQL server Database using a System DSN. Can
> anyone tell me how to connect to SQL Server using DSN in ASP.NET
> (VB.Net). Using a Try Catch block.
>
> Does anyone know how to create a "filename.DSN" file. I know how to
> create a system DSN, but my N/W admin has asked me to create a DSN
> file to send him. which would be a file name with ".DSN" extension, so
> that he can place it on the server.
>
> thanks in advance.



 
Reply With Quote
 
 
 
 
Kenneth Keeley
Guest
Posts: n/a
 
      01-12-2004
Hi,
Could you show a code sample of how to connect to an sql database using
the SQL .net Classes

Thanks
Kenneth

"Kevin Spencer" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Why on earth would you want to use a System or File DSN to connect to a

SQL
> Server?!
>
> First, a System or File DSN uses ODBC (Open Database Connectivity), which

is
> a wrapper for OLE DB (Object Linking and Embedding for Databases). This
> means that your database connectivity will be as slow as possible. You

have
> 2 other choices. One is to use OLE DB, which eliminates the wrapper of

ODBC.
> The other is to use the native SQL .Net classes (System.Data.SqlClient).
> This is the fastest way to connect to a SQL Server with .Net.




 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      01-12-2004
Hi Kenneth,

Here's a link to a whole bunch of samples on the Microsoft MSDN Library:

http://msdn.microsoft.com/library/de...dataadonet.asp

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Kenneth Keeley" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
> Could you show a code sample of how to connect to an sql database using
> the SQL .net Classes
>
> Thanks
> Kenneth
>
> "Kevin Spencer" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Why on earth would you want to use a System or File DSN to connect to a

> SQL
> > Server?!
> >
> > First, a System or File DSN uses ODBC (Open Database Connectivity),

which
> is
> > a wrapper for OLE DB (Object Linking and Embedding for Databases). This
> > means that your database connectivity will be as slow as possible. You

> have
> > 2 other choices. One is to use OLE DB, which eliminates the wrapper of

> ODBC.
> > The other is to use the native SQL .Net classes (System.Data.SqlClient).
> > This is the fastest way to connect to a SQL Server with .Net.

>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Database Database Database scott93727@gmail.com Computer Information 0 09-27-2012 02:43 AM
DataBase DataBase DataBase DataBase scott93727@gmail.com Computer Information 0 09-26-2012 09:40 AM
System DSN Faster Than File DSN! Arpan ASP General 7 07-02-2005 04:01 PM
Database Connectivity using DSN Arun K ASP .Net 1 12-23-2003 08:00 AM
connectivity through DSN David ASP General 1 11-10-2003 02:56 AM



Advertisments