473,408 Members | 1,875 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Re: oledbConnection to SQL Server

"Roger Withnell" <Ro***********@discussions.microsoft.comwrote in message
news:95**********************************@microsof t.com...
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
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jul 11 '08 #1
2 3862
I can now connect to the database on my operational server, which uses SQL
Server authentication, with:

'dbconn=New OleDbConnection("Provider=sqloledb; 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=sqloledb; Data
Source=UBE-IAS\SQLEXPRESS; Initial Catalog=upperbridge2; 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" <Ro***********@discussions.microsoft.comwrote in message
news:95**********************************@microsof t.com...
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
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jul 12 '08 #2
"Roger Withnell" <Ro***********@discussions.microsoft.comwrote in message
news:BB**********************************@microsof t.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=sqloledb; 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:
http://www.connectionstrings.com/?carrier=sqlserver2005

Please scroll down *past* the OleDb section until you come to the section
entitled SqlConnection (.NET)
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jul 12 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Lilly | last post by:
Hi all. I'm really sorry for this post, I'm sure most of you will think it's a silly question, but the following doesn't work and I'm really new to ASP.NET: <%@ Page Language="C#" %> <%@...
0
by: Grant | last post by:
My C# web application connects to an Access database using the OleDbConnection and OleDbDataReader. I have 3 other computers that connect to this server but very frequently I get an 'Unspecified...
2
by: Grant | last post by:
My C# web application connects to an Access database using the OleDbConnection and OleDbDataReader. I have 3 other computers that connect to this server but very frequently I get an 'Unspecified...
2
by: Roger Cantillo | last post by:
Hi, I'm using oleDBConnection to connect to SQL server. I keep getting "SQL Server does not exist" on Open event. The code I'm using is the following Dim objConn As New...
3
by: Ludvig | last post by:
This Exception is executed when using SQLConnection. OleDbConnection connects fine. System.EnterpriseServices.Platform.Initialize() +503...
2
by: Curt tabor | last post by:
Hi, I have several pages in my app that all use the same oleDBConnection(s). When this connection gets created, I store it as a Session variable so that other pages can access it w/o having...
4
by: Curtis | last post by:
Which is preferred or what is the difference? SQLConnection or OLEDbConnection. We are connecting to data in MSSQL2000 primarily through stored procedures.
4
by: tamarindm | last post by:
I am using the following to connect to a Sybase server. OleDbConnection Conn= new OleDbConnection(); string connstr = "Provider=Sybase ASE OLE DB Provider;Data Source=SERVER;User...
8
by: fniles | last post by:
Can I change the connection time out in VB.Net 2003 and MS Access (using OLEDbConnection) ? When I use Connect Timeout = 60 in the connectionstring, I get an error "Multiple-step OLE DB operation...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.