Results 1 to 3 of 3

Thread: connection for DSN or OLE DB

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2000
    Location
    Sao Paulo - SP - BRAZIL
    Posts
    65

    Question

    Which is faster: a connection for DSN or for OLE DB?
    The blessing of God enriches and it doesn't increase pains

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Lightbulb

    I don't think you understand the difference between the two.
    You can have an OLEDB connection using DSN or you can have DSNless connection. Here's an example:
    Code:
    Dim cnDSN As New ADODB.Connection
    Dim cnNoDSN As New ADODB.Connection
    
    'Here's how you can open connection based on DSN
    cnDSN.Open "Data Source=YourDSN;User ID=UserName;Password=UserPassword;"
    
    'Here's how you can open Connection without DSN
    cnNoDSN.Open "driver={SQL Server};" & _
          "server=YourServerName;uid=UserId;pwd=Password;database=DatabaseName"

  3. #3
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105
    IF you're trying to ask which is faster ODBC or OLEDB, the answer is depends.

    For SQL Server, OLEDB is faster. Other Architectures may not have OLEDB or may not work the same.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width