Re: oledbConnection to SQL Server

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mark Rae [MVP]

    #1

    Re: oledbConnection to SQL Server

    "Roger Withnell" <RogerWithnell@ discussions.mic rosoft.comwrote in message
    news:9579A956-349D-4D23-B253-4175C2D7AE1F@mi crosoft.com...
    What is the connection string in asp.net?
    OleDbConnection ("?")
    For ASP.NET you should use a native .NET data provider whenever possible:
    404 - Page Not Found. Shown when a URL cannot be mapped to any kind of resource.



    --
    Mark Rae
    ASP.NET MVP


  • =?Utf-8?B?Um9nZXIgV2l0aG5lbGw=?=

    #2
    Re: oledbConnection to SQL Server

    I can now connect to the database on my operational server, which uses SQL
    Server authentication, with:

    'dbconn=New OleDbConnection ("Provider=sqlo ledb; Data Source=ip address;
    Initial Catalog=dbName; User Id=xxxx; Password=yyyy;" )

    But I cannot connect to my in house SQL Server on localhost, which uses
    Windows Authentication. The string:

    dbconn=New OleDbConnection ("Provider=sqlo ledb; Data
    Source=UBE-IAS\SQLEXPRESS; Initial Catalog=upperbr idge2; User Id=;
    Password=;")

    gives the error Invalid authorization specification.

    What is the correct connection string for this?

    Thanking you in anticipation.

    Roger



    "Mark Rae [MVP]" wrote:
    "Roger Withnell" <RogerWithnell@ discussions.mic rosoft.comwrote in message
    news:9579A956-349D-4D23-B253-4175C2D7AE1F@mi crosoft.com...
    >
    What is the connection string in asp.net?
    OleDbConnection ("?")
    >
    For ASP.NET you should use a native .NET data provider whenever possible:
    404 - Page Not Found. Shown when a URL cannot be mapped to any kind of resource.

    >
    >
    --
    Mark Rae
    ASP.NET MVP

    >
    >

    Comment

    • Mark Rae [MVP]

      #3
      Re: oledbConnection to SQL Server

      "Roger Withnell" <RogerWithnell@ discussions.mic rosoft.comwrote in message
      news:BBDBC282-414C-4908-A529-3209CFCF0C57@mi crosoft.com...

      [top-posting corrected]
      What is the connection string in asp.net?
      OleDbConnection ("?")
      >>
      >For ASP.NET you should use a native .NET data provider whenever possible:
      >http://www.connectionstrings.com/?carrier=sqlserver2005
      >
      >I can now connect to the database on my operational server, which uses SQL
      Server authentication, with:
      >
      'dbconn=New OleDbConnection ("Provider=sqlo ledb; Data Source=ip address;
      Initial Catalog=dbName; User Id=xxxx; Password=yyyy;" )
      Again, why are you even trying to use OleDb to connect to SQL Server through
      ASP.NET...?
      What is the correct connection string for this?
      I've already given you the link, but here it is again:
      404 - Page Not Found. Shown when a URL cannot be mapped to any kind of resource.


      Please scroll down *past* the OleDb section until you come to the section
      entitled SqlConnection (.NET)


      --
      Mark Rae
      ASP.NET MVP


      Comment

      Working...