473,396 Members | 2,052 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,396 software developers and data experts.

ConnectionString

RN1
I use SQL Server 2005 Management Studio Express as the database. For
ASP files to connect to SQL Server 2005, I am using the following
ConnectionString:

<%
Dim objConn
Set objConn=Server.CreateObject("ADODB.CONNECTION")
objConn.Open "Data Source=RON\SQLEXPRESS;Initial
Catalog=RON;Integrated Security=True"
%>

But ASP generates the following error pointing to the objConn.Open
line:

-------------------------------------------------------------------------------
Multiple-step OLE DB operation generated errors. Check each OLE DB
status value, if available. No work was done.
-------------------------------------------------------------------------------

But when I use the same ConnectionString is ASPX files, no error gets
generated & I can access records residing in SQL Server 2005
successfully.

What could be causing this problem?
Feb 13 '08 #1
4 3117
RN1 wrote:
I use SQL Server 2005 Management Studio Express as the database. For
ASP files to connect to SQL Server 2005, I am using the following
ConnectionString:

<%
Dim objConn
Set objConn=Server.CreateObject("ADODB.CONNECTION")
objConn.Open "Data Source=RON\SQLEXPRESS;Initial
Catalog=RON;Integrated Security=True"
%>

But ASP generates the following error pointing to the objConn.Open
line:

----------------------------------------------------------------------
---------
Multiple-step OLE DB operation generated errors. Check each OLE DB
status value, if available. No work was done.
----------------------------------------------------------------------
---------
>
But when I use the same ConnectionString is ASPX files, no error gets
generated & I can access records residing in SQL Server 2005
successfully.

What could be causing this problem?
..Net provider vs OLEDB provider means different connection string.
You need to specify the provider. Go to www.connectionstrings.com to see
examples of connetion strings to use.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Feb 13 '08 #2
RN1
On Feb 14, 12:41*am, "Bob Barrows [MVP]" <reb01...@NOyahoo.SPAMcom>
wrote:
RN1 wrote:
I use SQL Server 2005 Management Studio Express as the database. For
ASP files to connect to SQL Server 2005, I am using the following
ConnectionString:
<%
* * Dim objConn
* * Set objConn=Server.CreateObject("ADODB.CONNECTION")
* * objConn.Open "Data Source=RON\SQLEXPRESS;Initial
Catalog=RON;Integrated Security=True"
%>
But ASP generates the following error pointing to the objConn.Open
line:
----------------------------------------------------------------------
---------
Multiple-step OLE DB operation generated errors. Check each OLE DB
status value, if available. No work was done.
----------------------------------------------------------------------
---------
But when I use the same ConnectionString is ASPX files, no error gets
generated & I can access records residing in SQL Server 2005
successfully.
What could be causing this problem?

.Net provider vs OLEDB provider means different connection string.
You need to specify the provider. Go towww.connectionstrings.comto see
examples of connetion strings to use.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.- Hide quoted text -

- Show quoted text -
Thanks Bob for the prompt response. I did have a look at
connectionstrings.com before posting my question but couldn't make it
work.

I even tried by creating a System DSN by navigating to Start-->Control
Panel-->Administrative Tools-->Data Sources (ODBC) & then using that
DSN but that didn't work as well. I am using the Windows
Authentication mode for logging into SQL Server 2005 & used the same
while creating the DSN.

I just can't seem to find where am I going wrong. Any other
suggestions, sir?

Regards,

Ron
Feb 13 '08 #3
RN1 wrote:
On Feb 14, 12:41 am, "Bob Barrows [MVP]" <reb01...@NOyahoo.SPAMcom>
wrote:
>RN1 wrote:
>>I use SQL Server 2005 Management Studio Express as the database. For
ASP files to connect to SQL Server 2005, I am using the following
ConnectionString:
>><%
Dim objConn
Set objConn=Server.CreateObject("ADODB.CONNECTION")
objConn.Open "Data Source=RON\SQLEXPRESS;Initial
Catalog=RON;Integrated Security=True"
%>
Thanks Bob for the prompt response. I did have a look at
connectionstrings.com before posting my question but couldn't make it
work.
Show me what you tried and the error message you received. The string
you tried above is not correct. It needs a "Provider=" attribute which
you can find at connectionstrings. I think it's SQLNCLI but you could
also use SQLOLEDB. I have not use SQL Express so I'm not sure if you
need a different provider. The thing is: you HAVE to specify the
provider in the connection string. Look at the OLEDB examples at
connectionstrings
>
I even tried by creating a System DSN
No no no no no - stay away from ODBC!
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Feb 13 '08 #4

Uzytkownik "RN1" <rn**@rediffmail.comnapisal w wiadomosci
news:25**********************************@v67g2000 hse.googlegroups.com...
>I use SQL Server 2005 Management Studio Express as the database. For
ASP files to connect to SQL Server 2005, I am using the following
ConnectionString:
<%
Dim objConn
Set objConn=Server.CreateObject("ADODB.CONNECTION")
objConn.Open "Data Source=RON\SQLEXPRESS;Initial
Catalog=RON;Integrated Security=True"
%>
But ASP generates the following error pointing to the objConn.Open
line:
try
Driver={SQL
Server};Server=localhost\sqlexpress;Database=North wind;Trusted_Connection=yes
--
td
Feb 13 '08 #5

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

Similar topics

4
by: Devante | last post by:
Hi, I am fairly new to ASP.NET and have been working on a web form that will allow a user to upload images to a database. I have found a sample web form that I have been trying to get working,...
2
by: oswald verlinden | last post by:
Hi all, i have a client with an old working app. in PowerBuilder for which i need to create new modules. The db is sqlanywhere 5.0.4 The db is configured in ODBC. Now, i don't seem to be able...
2
by: G. Dean Blake | last post by:
We currently distribute a web application to serveral servers for a customer. We have been putting the connection string in our web.config file under <appSettings> <add...
6
by: Tony | last post by:
Dear All, When I run an example program on the http://www.dotnetjunkies.com/quickstart/util/srcview.aspx?path=/quickstart/aspplus/samples/webforms/data/datagrid1.src&file=VB\datagrid1.aspx&font=3 ...
4
by: Shapper | last post by:
Hello, I have this connectionString in a DataReader: Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Ole DB Services=-4; Data Source=C:\db.mdb" It's working fine. Now i...
10
by: Laura K | last post by:
Tried all kinds of things. I get the error. The ConnectionString property has not been initialized. Any help appreciated. ...
2
by: Chen | last post by:
I have a project which contain several WinForms. I put a SqlDataAdapter in Many of the Forms. I want these SqlConnection1.ConnectionString Point to the same SQL Server. So I create a Global Const...
3
by: Jim Andersen | last post by:
Hi, I would appreciate if someone could explain this behaviour, and maybe offer a better solution. I have been working with the GridView control. And SqlDataSource. It works great if I do:...
3
by: Arpan | last post by:
I recently installed SQL Server 2005 (Management Studio Express) along with SQL Server 2005 Express (Configuration Manager) in my Win2K Pro m/c & use IIS 5.0 to run ASPX projects. I could add my...
5
by: Radu | last post by:
Hi. In a repeater I have as ItemTemplate the following, among others, and everything works great: <asp:SqlDataSource ID="LocationSqlDataSource" SelectCommand="SELECT blah-blah-blah"...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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,...

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.