473,395 Members | 1,454 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,395 software developers and data experts.

Unable to connect to remote production database from ASP.NET

Hi All,

I am trying to connect to an SQL SERVER in a remote production server from ASP.net using following code.

Dim conProd As New OleDbConnection("Provider=SQLOLEDB.1;Data Source=ServerName;UID=User Name;PWD=Password;Initial Catalog=Database")
conProd.Open()

I am getting following error while running this script

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

But I am able to connect to this server using following three other ways:

1) Using query analyzer

2) I created DSN and performed test connection, it succeded.

3) In ASP.NET -> Server Explorer -> Data Connections, I added this connection and test connection also successful.

I tried to connect to this server in VB 6.0 using following code

Dim conProd As New ADODB.Connection

conProd.Open "Provider=SQLOLEDB;Data Source=ServerName;Initial Catalog=Database; Timeout=500;", "UserName", "Password"

I am able to connect using this above code in VB 6.0 also.

But I dont what is happeing in .NET. Please help me.

I am using XP and VS .NET 2003
Mar 31 '08 #1
1 1089
kunal pawar
297 100+
I guess, in dot net it does not required to mention Provider. So remove provider and try again
Apr 1 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Scott Holland | last post by:
HELP - Need to connect to DB2 database on AIX from NT server. Also AS/400 from NT Server -- I am experienced in ORACLE and a novice at DB2. What tools would be the equivalent of Net*8 or...
2
by: schnarff | last post by:
Hello All, I've got an odd situation on my hands, and I'm hoping someone here can help. I've got DB2 v8.1 Express Edition set up on a Windows 2000 Server system, and it appears to be working...
0
by: Lawanya | last post by:
In smart client application using emulator in .Net ,I have tried for datbase conenctivity.But system.data.sqlclient was not available.So i used webservices and connected to database in same...
4
by: TC | last post by:
Hello All, I apology for posting to many groups but I wasn't sure which group would be best targeted with my question. I have inherited an ASP.Net application that requires some maintenance &...
0
by: Saumin | last post by:
Hi, I have a web service which i am calling programmatically from asp.net web page. It works fine on my machine but when i move the code to production, i get the error: The underlying connection...
16
by: gumby | last post by:
I'm having trouble getting HADR to work with the sample databases on two HS20 xSeries blades, Red Hat ES4 up3, DB2 8.2.4, getting the following error. SQL1768N Unable to start HADR. Reason code...
3
by: Monty | last post by:
OK, I had an issue with this and found lots of advice that did not apply, so I'm posting what I found hoping it might help someone else. Here's the sitch: you have a COM app that calls to a .Net...
4
by: newladder | last post by:
Hi all, Iam struck with one of the problem with postgres. Please help me out.... Iam trying to connect to connect to postgres database on remote machine with the IP address 10.2.1.4. Iam unable...
0
by: =?Utf-8?B?dG9t?= | last post by:
Hi, I have a .net 2.0 windows client that connects to webservices. In most cases it works fine. However I have one client that gets 'Unable to connect to the remote server'. If on that client...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...

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.