Database Connectivity using DSN

Discussion in 'ASP .Net' started by Niks, Dec 22, 2003.

  1. Niks

    Niks Guest

    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.
     
    Niks, Dec 22, 2003
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > 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.
     
    Kevin Spencer, Dec 22, 2003
    #2
    1. Advertising

  3. Hi,
    Could you show a code sample of how to connect to an sql database using
    the SQL .net Classes

    Thanks
    Kenneth

    "Kevin Spencer" <> wrote in message
    news:...
    > 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.
     
    Kenneth Keeley, Jan 12, 2004
    #3
  4. Hi Kenneth,

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

    http://msdn.microsoft.com/library/d...tart/html/cpsmpnetsamples-howtodataadonet.asp

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

    "Kenneth Keeley" <> wrote in message
    news:...
    > Hi,
    > Could you show a code sample of how to connect to an sql database using
    > the SQL .net Classes
    >
    > Thanks
    > Kenneth
    >
    > "Kevin Spencer" <> wrote in message
    > news:...
    > > 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.

    >
    >
    >
     
    Kevin Spencer, Jan 12, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. gpeacock

    ASP database connectivity KB253604

    gpeacock, Nov 5, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    353
    Michael Evanchik
    Nov 10, 2003
  2. Arun K

    Database Connectivity using DSN

    Arun K, Dec 22, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    412
    Natty Gur
    Dec 23, 2003
  3. David

    connectivity through DSN

    David, Nov 10, 2003, in forum: ASP General
    Replies:
    1
    Views:
    126
    Bob Barrows
    Nov 10, 2003
  4. Arpan

    System DSN Faster Than File DSN!

    Arpan, Jun 26, 2005, in forum: ASP General
    Replies:
    7
    Views:
    286
  5. Al Reynolds
    Replies:
    4
    Views:
    309
    Al Reynolds
    Sep 11, 2003
Loading...

Share This Page