Showing posts with label connection. Show all posts
Showing posts with label connection. Show all posts

Sunday, March 25, 2012

ASP to SQL Connection Prob, Same Server, IIS

Yes, it should be easy...

I have a single box hosing IIS and SQL Server 2000. In my ASP script I've
tried using the following connection strings to attempt to connect to no
avail:

"Provider=SQLOLEDB;Server=servername\instancename,1 433;Database=TEST;network=DBMSSOCN;uid=TEST;pwd=TE ST"
"Provider=SQLOLEDB;Server=local IP
address\instancename,1433;Database=TEST;network=DB MSSOCN;uid=TEST;pwd=TEST"

"Provider=SQLOLEDB;Server=external IP
address\servername\instancename;Database=TEST;netw ork=DBMSSOCN;uid=TEST;pwd=TEST"

Getting error:

"Microsoft OLE DB Provider for SQL Server (0x80004005)
[DBNETLIB][ConnectionOpen (Connect()).]Specified SQL server not found."

SQL Server is set up for SQL and Windows authentication. Server utility is
configured for both named pipes and TCP/IP. Port is set to 1433.

I can connect to the DB using Query Analyzer both from the local server
itself AND from a remote laptop over the internet.

So, what am I missing???

Thanks in advance,

ChadChad Richardson (chad@.NIXSPAM_chadrichardson.com) writes:
> SQL Server is set up for SQL and Windows authentication. Server utility is
> configured for both named pipes and TCP/IP. Port is set to 1433.

But you have a named instance. Yes, you can of course have a named
instance on port 1433, but normally this is where you have the unnamed
instance.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||OK. But if you can have one, than do you have any other ideas on why it
would not connect?

I have this same set up on my development laptop and it connects fine,
except that my web site on the laptop is served up from a virtual directory.
On the home development box, the web site is located under the
InetPub\wwwroot folder. Not sure if this would change the "perspective" that
the connection call is coming from and hence would require a different
syntax...

"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns960E3D672D9AYazorman@.127.0.0.1...
> Chad Richardson (chad@.NIXSPAM_chadrichardson.com) writes:
>> SQL Server is set up for SQL and Windows authentication. Server utility
>> is
>> configured for both named pipes and TCP/IP. Port is set to 1433.
> But you have a named instance. Yes, you can of course have a named
> instance on port 1433, but normally this is where you have the unnamed
> instance.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp|||Chad Richardson (chad@.NIXSPAM_chadrichardson.com) writes:
> OK. But if you can have one, than do you have any other ideas on why it
> would not connect?

I asked my question mainly as incentive for you to double-check.

> I have this same set up on my development laptop and it connects fine,
> except that my web site on the laptop is served up from a virtual
> directory. On the home development box, the web site is located under
> the InetPub\wwwroot folder. Not sure if this would change the
> "perspective" that the connection call is coming from and hence would
> require a different syntax...

I don't really see why either. Then again, I'm completely ignorant about
IIS.

But there is one thing I don't like in your connection string:
network=DBMSSOCN. I believe this library is out-dated. Not that I
think it matters, but remove it.

And, hm, what about removing 1433? After all there is a service to
find the port. And then there is shared memory which does not even need a
port...

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

ASP SQL Server slow connection

I just migrated the database and web pages from one machine to another
machine. The speed of the original web pages are faster than the current
one. I think there is no problem on the web pages, but maybe the setting
problem in IIS or SQL Server
I wonder if anything to do on IIS or SQL Server settings'This thread is active in other groups still.
Ray at work
"John Davis" <jrefactor@.hotmail.com> wrote in message
news:e2myQeJfDHA.2292@.TK2MSFTNGP10.phx.gbl...
> I just migrated the database and web pages from one machine to another
> machine. The speed of the original web pages are faster than the current
> one. I think there is no problem on the web pages, but maybe the setting
> problem in IIS or SQL Server
> I wonder if anything to do on IIS or SQL Server settings'
>|||Hello,
Try this KB article :
FIX: Connection to SQL Server Database Using IP Address Is Unusually
Slow
http://support.microsoft.com/?id=300420
Regards,
Paul Lynch
MCSE

ASP SQL SERVER CONNECTION

how can i connect sql server with ASP vbscript?
thanks
There are various sites that show you how to connect to SQL Server using
VBScript from ASP. Some are listed at: http://vyaskn.tripod.com/asp.htm
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"dora" <dora.san@.freemail.gr> wrote in message
news:em%234DrjHFHA.896@.TK2MSFTNGP10.phx.gbl...
how can i connect sql server with ASP vbscript?
thanks
|||Hi
Try something like this.. put it in a separate ASP module and INCLUDE it in
your ASP in a suitable place...
'--
Set odbCon = Server.CreateObject("ADODB.Connection")
odbCon.Open "Driver={SQL
Server};SERVER=SN;DATABASE=dbName;UID=userID;PWD=p assword;"
'---
sn is the server name and can ce local (eg "Server42") or remote (eg
SSDB210.ahostsite.com)
hope this helps
Jim MCDonald
"dora" <dora.san@.freemail.gr> wrote in message
news:em%234DrjHFHA.896@.TK2MSFTNGP10.phx.gbl...
> how can i connect sql server with ASP vbscript?
>
> thanks
>

ASP SQL SERVER CONNECTION

how can i connect sql server with ASP vbscript?
thanksThere are various sites that show you how to connect to SQL Server using
VBScript from ASP. Some are listed at: http://vyaskn.tripod.com/asp.htm
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"dora" <dora.san@.freemail.gr> wrote in message
news:em%234DrjHFHA.896@.TK2MSFTNGP10.phx.gbl...
how can i connect sql server with ASP vbscript?
thanks|||Hi
Try something like this.. put it in a separate ASP module and INCLUDE it in
your ASP in a suitable place...
'--
Set odbCon = Server.CreateObject("ADODB.Connection")
odbCon.Open "Driver={SQL
Server};SERVER=SN;DATABASE=dbName;UID=us
erID;PWD=password;"
'---
sn is the server name and can ce local (eg "Server42") or remote (eg
SSDB210.ahostsite.com)
hope this helps
Jim MCDonald
"dora" <dora.san@.freemail.gr> wrote in message
news:em%234DrjHFHA.896@.TK2MSFTNGP10.phx.gbl...
> how can i connect sql server with ASP vbscript?
>
> thanks
>

Thursday, March 22, 2012

ASP error while accessing the website

Hi
I get different errors when I access the same web page....This page opens a
ADO connection....
First time --
__________________________________________________ ___
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver]Timeout expired
/common/common.asp, line 65
_______________________________________________--
Another time...I got an Invalid connection error..
Can someone tell me what the problem really is...The website was working
perfectly fine until few days agao..There were no changes to the ASP code...
Thanks & Regards
Imtiaz
sql client changed from tcp\ip to named pipes ?
nic card setting set from 100mb Full to "Auto"
?
Greg Jackson
PDX, Oregon
|||Timeout occurs if you don't take network congestion (i.e. lag) into account.
Double check your connection string to see if you have given enough time for
sql connection (default is 15 sec) and sql command execution (default is 30
sec).
-oj
"Imtiaz" <Imtiaz@.discussions.microsoft.com> wrote in message
news:F757C5B8-0EC9-4A09-888E-6A7282DFC922@.microsoft.com...
> Hi
> I get different errors when I access the same web page....This page opens
> a
> ADO connection....
> First time --
> __________________________________________________ ___
> Microsoft OLE DB Provider for ODBC Drivers error '80004005'
> [Microsoft][ODBC SQL Server Driver]Timeout expired
> /common/common.asp, line 65
> _______________________________________________--
> Another time...I got an Invalid connection error..
> Can someone tell me what the problem really is...The website was working
> perfectly fine until few days agao..There were no changes to the ASP
> code...
>
> Thanks & Regards
> Imtiaz
>
|||Problem has been solved...Web Server wasn't able to ping to SQL Server
properly...
Thanks for your replies...
"oj" wrote:

> Timeout occurs if you don't take network congestion (i.e. lag) into account.
> Double check your connection string to see if you have given enough time for
> sql connection (default is 15 sec) and sql command execution (default is 30
> sec).
> --
> -oj
>
> "Imtiaz" <Imtiaz@.discussions.microsoft.com> wrote in message
> news:F757C5B8-0EC9-4A09-888E-6A7282DFC922@.microsoft.com...
>
>

ASP error while accessing the website

Hi
I get different errors when I access the same web page....This page opens a
ADO connection....
First time --
________________________________________
_____________
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver]Timeout expired
/common/common.asp, line 65
________________________________________
_______--
Another time...I got an Invalid connection error..
Can someone tell me what the problem really is...The website was working
perfectly fine until few days agao..There were no changes to the ASP code...
Thanks & Regards
Imtiazsql client changed from tcp\ip to named pipes ?
nic card setting set from 100mb Full to "Auto"
?
Greg Jackson
PDX, Oregon|||Timeout occurs if you don't take network congestion (i.e. lag) into account.
Double check your connection string to see if you have given enough time for
sql connection (default is 15 sec) and sql command execution (default is 30
sec).
-oj
"Imtiaz" <Imtiaz@.discussions.microsoft.com> wrote in message
news:F757C5B8-0EC9-4A09-888E-6A7282DFC922@.microsoft.com...
> Hi
> I get different errors when I access the same web page....This page opens
> a
> ADO connection....
> First time --
> ________________________________________
_____________
> Microsoft OLE DB Provider for ODBC Drivers error '80004005'
> [Microsoft][ODBC SQL Server Driver]Timeout expired
> /common/common.asp, line 65
> ________________________________________
_______--
> Another time...I got an Invalid connection error..
> Can someone tell me what the problem really is...The website was working
> perfectly fine until few days agao..There were no changes to the ASP
> code...
>
> Thanks & Regards
> Imtiaz
>|||Problem has been solved...Web Server wasn't able to ping to SQL Server
properly...
Thanks for your replies...
"oj" wrote:

> Timeout occurs if you don't take network congestion (i.e. lag) into accoun
t.
> Double check your connection string to see if you have given enough time f
or
> sql connection (default is 15 sec) and sql command execution (default is 3
0
> sec).
> --
> -oj
>
> "Imtiaz" <Imtiaz@.discussions.microsoft.com> wrote in message
> news:F757C5B8-0EC9-4A09-888E-6A7282DFC922@.microsoft.com...
>
>

ASP- Db Connection problem

Hi there,
I have a web application developed in ASP and SQL-server. One of my clients wanted the SQL DB to reisde in a separate machine than the IIS box. Also he doesn't want the SQL - DB box to be protected from public access. So only the IIS box is assiged a public IP, and the SQL box is in the same network(LAN) as of the IIS box. Now using TCP/IP can I connect to the SQL server from my ASP? or should I have to use Named pipes?

Here is the Connection string that I used:
constr="Provider=SQLOLEDB;Network Library=DBMSSOCN;SERVER=xxx;Initial Catalog=mydb;User Id=user;Password=xxxxxx;"

When I use the above, I don't know what is happening.. but my IE animated picture at the top right corner is moving(i.e its talking to the server) without any response. Can anyone of you give me a clue why this is happening?
Also I am NOT receiving any error, like 'Connection timed out' , or Script Timed out. That makes me nervous.Try creating a dsn and test the connection and/or write a vb app that uses the ado data control and use the automated connection string creator and test the connection. If that works, copy the connection string from your ado data control to your asp page.|||I like to use TCP/IP to connect, even though you hear that Name Pipe is faster. The simplest thing to do to see if you can use TCP/IP from your IIS machine is to physically logon to your IIS machine and go to DOS and enter the PING command to your SQL Server machine. Make sure you PING by hostname and not by IP address. If you get a response, perfect use TCP/IP to connect. If you don't get a response and your SQL Server machine has a static IP address, then PING by IP Address. If that is fine then I would enter my SQL Server machine into an LMHost file.

ASP Connection String To SQL Server

Hi
This is new to me.
I am trying to connect an asp page to sql server.
Any help would be gratefully appreciated
I get the error message:
Technical Information (for support personnel)
a.. Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
/idataconnection.asp, line 10
b.. Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)
c.. Page:
GET /idataconnection.asp
The code I have in the page is:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<%
oConn.Open "DSN=pubs;" & _
"Uid=testuser;" & _
"Pwd=123"
%>
</body>
</html>You have to first set oConn to a new instance of the ADODB connection
object.
"qqqq" <dddh@.ddd.clc> wrote in message
news:BW0Xb.4715$vo1.1496@.newsfep4-winn.server.ntli.net...
> Hi
> This is new to me.
> I am trying to connect an asp page to sql server.
> Any help would be gratefully appreciated
> I get the error message:
> Technical Information (for support personnel)
> a.. Error Type:
> Microsoft VBScript runtime (0x800A01A8)
> Object required: ''
> /idataconnection.asp, line 10
>
> b.. Browser Type:
> Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)
> c.. Page:
> GET /idataconnection.asp
>
> The code I have in the page is:
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
> <title>New Page 1</title>
> </head>
> <body>
> <%
> oConn.Open "DSN=pubs;" & _
> "Uid=testuser;" & _
> "Pwd=123"
> %>
> </body>
> </html>
>|||Hello,
try this
<%
set conn1=server.CreateObject("adodb.connection")
conn1.cursorlocation=3
conn1.Open "Provider=sqloledb;" & _
"Data Source=DB;" & _
"Initial Catalog=ayaz;" & _
"User Id=ayaz;" & _
"Password=ayaz"
%>
Thanks,
Warm Regards,
Ayaz Ahmed
Software Engineer & Web Developer
Creative Chaos (Pvt.) Ltd.
"Managing Your Digital Risk"
http://www.csquareonline.com
Karachi, Pakistan
Mobile +92 300 2280950
Office +92 21 455 2414
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!

ASP Authentication with SQL Server 2005 - not express, permanent change

Hi all,

I've read up on the fact that if you use SQL server 2005 instead of SQL express you need to change the connection string in web.config.

Is there anyway to make this default connection type, or do I have to do it for every website I create. i.e. is there a global file that this connection can be entered into. Then whenever I start a new website I don't have to put the string in.

Just me being lazy really. But it's nice to know if it's possible.

Many thanks

DrB2k2

Hi,

I did it also on my dev machine. Just change the setting of the connectionstring for the LocalSqlServer in the machine.config. Make sure to make a backup, just in case, of this file first. You can find the machine.config file in this folder:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG

Grz, Kris.

|||

Lovely I'll give it a go,thanks

DrB2k2

sql

ASP and MSDE Connection Problems

Hello
I have a simple MSDE database set up on this local machine. I have a small
asp.net web page that tries to query the database and returns a list from
one of the columns. Nothing fancy, just trying to set it all up and get it
all working.
I get an error on the page when I run it.
Exception Details: System.Data.SqlClient.SqlException: Login failed for
user 'BBAISLEY\ASPNET'.
I assume this means that the user account isn't set up right, but I am not
telling it to use this account. I have the following connection string:
Dim connectionString As String = "server='BBAISLEY\MSDEBBAISLEY';
trusted_connection=true; database='music_cds'; user id=SQL;
password=xxxxxxxxxx;"
Can someone help me get this working? I would like to make a simple account
for all of my apps to use, don't really care what its called for now.
When I log in, I can only use the windows authencation method, so maybe my
MSDE instance isn't set for SQL passwords? How can I check this?
Thanks
Brett
You are using ASP.NET?
This is a common error as the applications default to using the ASPNET
account.
You have two choices:
1. Give access to the ASPNET account. (I dont think you want to do this
though).
2. Modify the AUTHENTICATION heading in the web.config file, & also the
virtual directory/site/directory property to only allow windows
authenticated users into the folder:
Under the AUTHENTICATION heading add:
<identity impersonate="true" />
Modify IIS to only allow windows authenticated users through...
Cheers,
James Goodman
"Brett Baisley" <baisley@.hotmail.com.REMOVETHIS> wrote in message
news:e$TLLgdLEHA.3292@.TK2MSFTNGP11.phx.gbl...
> Hello
> I have a simple MSDE database set up on this local machine. I have a small
> asp.net web page that tries to query the database and returns a list from
> one of the columns. Nothing fancy, just trying to set it all up and get it
> all working.
> I get an error on the page when I run it.
> Exception Details: System.Data.SqlClient.SqlException: Login failed for
> user 'BBAISLEY\ASPNET'.
> I assume this means that the user account isn't set up right, but I am not
> telling it to use this account. I have the following connection string:
> Dim connectionString As String = "server='BBAISLEY\MSDEBBAISLEY';
> trusted_connection=true; database='music_cds'; user id=SQL;
> password=xxxxxxxxxx;"
> Can someone help me get this working? I would like to make a simple
account
> for all of my apps to use, don't really care what its called for now.
> When I log in, I can only use the windows authencation method, so maybe my
> MSDE instance isn't set for SQL passwords? How can I check this?
> Thanks
> Brett
>
|||Whoops, I misread!
It looks like you do want to use the first suggestion I made.
By default, msde is only setup for Windows Authentication, rather than sql
authentication.
See this link for information on how to modify this:
http://support.microsoft.com/default...en-us%3B319930
http://support.microsoft.com/default...n-us%3BQ322336
Cheers,
James Goodman
"Brett Baisley" <baisley@.hotmail.com.REMOVETHIS> wrote in message
news:e$TLLgdLEHA.3292@.TK2MSFTNGP11.phx.gbl...
> Hello
> I have a simple MSDE database set up on this local machine. I have a small
> asp.net web page that tries to query the database and returns a list from
> one of the columns. Nothing fancy, just trying to set it all up and get it
> all working.
> I get an error on the page when I run it.
> Exception Details: System.Data.SqlClient.SqlException: Login failed for
> user 'BBAISLEY\ASPNET'.
> I assume this means that the user account isn't set up right, but I am not
> telling it to use this account. I have the following connection string:
> Dim connectionString As String = "server='BBAISLEY\MSDEBBAISLEY';
> trusted_connection=true; database='music_cds'; user id=SQL;
> password=xxxxxxxxxx;"
> Can someone help me get this working? I would like to make a simple
account
> for all of my apps to use, don't really care what its called for now.
> When I log in, I can only use the windows authencation method, so maybe my
> MSDE instance isn't set for SQL passwords? How can I check this?
> Thanks
> Brett
>
|||Ahh, that fixed it up. Thanks James
"James" <jamesATnorton-associates.co.ukREMOVE> wrote in message
news:e6GypgfLEHA.1644@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> Whoops, I misread!
> It looks like you do want to use the first suggestion I made.
> By default, msde is only setup for Windows Authentication, rather than sql
> authentication.
> See this link for information on how to modify this:
> http://support.microsoft.com/default...en-us%3B319930
> http://support.microsoft.com/default...n-us%3BQ322336
>
> --
> Cheers,
> James Goodman
> "Brett Baisley" <baisley@.hotmail.com.REMOVETHIS> wrote in message
> news:e$TLLgdLEHA.3292@.TK2MSFTNGP11.phx.gbl...
small[vbcol=seagreen]
from[vbcol=seagreen]
it[vbcol=seagreen]
not[vbcol=seagreen]
> account
my
>

Tuesday, March 20, 2012

ASP / SQLServer connection

Hi, I'm having trouble connecting to SQLServer in my ASP program.

here's the code

<%
dim objConnection, ObjRecorSet, strConnection, strOut, objCmd, objParameters
Set objConnection = Server.CreateObject ("ADODB.Connection")
strConnection = "DSN=SQL_Tracker;Database=Tracker;UID=sa;PWD=;"
objConnection.Open strConnection
...
%
I'm getting this error on the line that opens the connection.

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
'HOME\IUSR_HOME'.
/Tracker/list_team.asp, line 11

Notes:

I've set up the DSN called 'SQL_Tracker' in my ODBC settings.
When I use the Test Connection button it's successful.

The SQL Server is running on my own computer, and so I have
full DBA rights on it

any ideas what's wrong?Your connection string uses SQL authentication but the error message looks
like Windows authentication was attempted. Did you specify SQL
authentication or Windows authentication in your ODBC setup? Is your SQL
Server configured to allow both SQL and Windows authentication?

Also, note that you should never use 'sa' for application database
connections and you may get uninvited guests with a blank 'sa' password.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Peter Morris" <nospam.ple@.se> wrote in message
news:RmS9d.5432$xb.1658@.text.news.blueyonder.co.uk ...
> Hi, I'm having trouble connecting to SQLServer in my ASP program.
> here's the code
> <%
> dim objConnection, ObjRecorSet, strConnection, strOut, objCmd,
> objParameters
> Set objConnection = Server.CreateObject ("ADODB.Connection")
> strConnection = "DSN=SQL_Tracker;Database=Tracker;UID=sa;PWD=;"
> objConnection.Open strConnection
> ...
> %>
> I'm getting this error on the line that opens the connection.
> Error Type:
> Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
> [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
> 'HOME\IUSR_HOME'.
> /Tracker/list_team.asp, line 11
>
> Notes:
> I've set up the DSN called 'SQL_Tracker' in my ODBC settings.
> When I use the Test Connection button it's successful.
> The SQL Server is running on my own computer, and so I have
> full DBA rights on it
> any ideas what's wrong?|||Stop using ODBC/DSN. This may not resolve the issue, but at least your
application will be faster & the database connection will be supported
in the future.

Please read the following pages.

http://www.aspfaq.com/show.asp?id=2126

http://msdn.microsoft.com/library/d..._components.asp

Peter Morris wrote:

> Error Type:
> Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
> [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
> 'HOME\IUSR_HOME'.
> /Tracker/list_team.asp, line 11

--
Please do not contact me directly or ask me to contact you directly for
assistance.

If your question is worth asking, it's worth posting.

If its not worth posting you should have done a search on
http://www.google.com/ http://www.google.com/grphp?hl=en&tab=wg&q= or
http://news.google.com/froogle?hl=en&tab=nf&ned=us&q= before wasting our
time.sql

ASP > SQL Invalid Connection Error ... Help

I would appreciate any help I can get. I'm no expert at ASP or SQL, but
I've done a little research and I feel like I'm doing things right.
I'm getting the following error message from my ASP page.
Microsoft OLE DB Provider for SQL Server error '80004005'
[DBNETLIB][ConnectionOpen (ParseConnectParams()).]Invalid connection
.
Here's the ASP code:
set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=SQLOLEDB;Persist Security Info=false;Data
Source=http://sql2005.mywebhost.com;Initial Catalog=myDB;UID=XXXX;Pwd=YYYY"
I have a web host who hosts the shared SQL 2005 server on a separate box
from the web server (Windows Server 2003/IIS), which is why it's not a local
connection. Since it's a shared SQL server, I have very limited access to
the configuration settings, logs, etc.
I have already tried the following to see what the problem is, and I'm
stumped:
1. I verified the username, password and host url by connecting remotely
to myDB with SQL Express using the values in the connection string
2. I tried setting Persist Security Info to true, and taking it out
entirely. Neither made a difference.
3. I can connect programmatically to the DB using the following
connection string in C#
DBConnection = new SqlConnection();
DBConnection.ConnectionString = "Persist Security
Info=False;database=myDB;server=sql2005.mywebhost.com;User
ID=AAAA;Password=BBBB";
4. I have successfully accessed the DB using the Database Connection
Wizard in MS Frontpage. However, I'm now trying to generate an XML
document, which I believe is beyond the Wizard's capabilities.
The only thing I can think of is that the "Provider=SQLOLEDB" is wrong or is
not supported by my web host's SQL configuration. Could that be it?
I would really appreciate any insight here.
ScoutIt looks like it's the data source in your connection
string. Look at what you used for server in your C# app -
the connection that worked. That's what you want to be
using.
-Sue
On Tue, 8 Aug 2006 17:47:16 -0700, "The Scout"
<feedback@.pokersitescout.com> wrote:

>I would appreciate any help I can get. I'm no expert at ASP or SQL, but
>I've done a little research and I feel like I'm doing things right.
>I'm getting the following error message from my ASP page.
>Microsoft OLE DB Provider for SQL Server error '80004005'
>[DBNETLIB][ConnectionOpen (ParseConnectParams()).]Invalid connectio
n.
>Here's the ASP code:
>set objConn = Server.CreateObject("ADODB.Connection")
>objConn.Open "Provider=SQLOLEDB;Persist Security Info=false;Data
>Source=http://sql2005.mywebhost.com;Initial Catalog=myDB;UID=XXXX;Pwd=YYYY"
>I have a web host who hosts the shared SQL 2005 server on a separate box
>from the web server (Windows Server 2003/IIS), which is why it's not a loca
l
>connection. Since it's a shared SQL server, I have very limited access to
>the configuration settings, logs, etc.
>I have already tried the following to see what the problem is, and I'm
>stumped:
>1. I verified the username, password and host url by connecting remotely
>to myDB with SQL Express using the values in the connection string
>2. I tried setting Persist Security Info to true, and taking it out
>entirely. Neither made a difference.
>3. I can connect programmatically to the DB using the following
>connection string in C#
>DBConnection = new SqlConnection();
>DBConnection.ConnectionString = "Persist Security
>Info=False;database=myDB;server=sql2005.mywebhost.com;User
>ID=AAAA;Password=BBBB";
>4. I have successfully accessed the DB using the Database Connection
>Wizard in MS Frontpage. However, I'm now trying to generate an XML
>document, which I believe is beyond the Wizard's capabilities.
>The only thing I can think of is that the "Provider=SQLOLEDB" is wrong or i
s
>not supported by my web host's SQL configuration. Could that be it?
>I would really appreciate any insight here.
>Scout
>

ASP & SQL Server 2000 Connection

I am receiving the following error message when attempting to connect to SQL Server 2000.

CODE::::::::::::::::::::::::CODE:::::::::::::::::: ::::::::

Dim conn, strSQL, rs

set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionString = "driver={SQL Server};" & _
"server=SF0039;" & _
"Address=10.108.1.58,1433;" & _
"Network=CHICAGO;" & _
"uid=remote;" & _
"pwd=remote;" & _
"database=heat601;"

strSQL = "Select custid from subset"
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strSQL, conn

ERROR:::::::::::::::::::::::ERROR::::::::::::::::: :::::::::

ADODB.Recordset (0x800A0E7D)
The connection cannot be used to perform this operation. It is either closed or invalid in this context.Add conn.Open before your rs.Open statement.

Regards,

Hugh Scott

Originally posted by Terry Ward
I am receiving the following error message when attempting to connect to SQL Server 2000.

CODE::::::::::::::::::::::::CODE:::::::::::::::::: ::::::::

Dim conn, strSQL, rs

set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionString = "driver={SQL Server};" & _
"server=SF0039;" & _
"Address=10.108.1.58,1433;" & _
"Network=CHICAGO;" & _
"uid=remote;" & _
"pwd=remote;" & _
"database=heat601;"

strSQL = "Select custid from subset"
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strSQL, conn

ERROR:::::::::::::::::::::::ERROR::::::::::::::::: :::::::::

ADODB.Recordset (0x800A0E7D)
The connection cannot be used to perform this operation. It is either closed or invalid in this context.

ASP - SQL server connection Issue

Hello All,

I am building an application using SQL server 2000. When I was using SQL database on my local machine it works great but now I moved the database on the server and as soon as I try to connect it gives me this error message.

What I am doing wrong?

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)**

Thanks

Check web.config if it is pointing to the right server.

bullpit

|||

Bingo...

Thanks

ASP - Connection to second instance

I have a second instance set up for a sql server. I'm going
crazy trying to determine the syntax for the connection string
for my ASP program.
Please help
Mindy Jeanne LeslieUsually it would be something like:
...data source=SERVERNAME\INSTANCENAME; user id=.........
Regards.
"Mindy Leslie via SQLMonster.com" wrote:
> I have a second instance set up for a sql server. I'm going
> crazy trying to determine the syntax for the connection string
> for my ASP program.
> Please help
> Mindy Jeanne Leslie
>

ASP - Connection to second instance

I have a second instance set up for a sql server. I'm going
crazy trying to determine the syntax for the connection string
for my ASP program.
Please help
Mindy Jeanne Leslie
Usually it would be something like:
...data source=SERVERNAME\INSTANCENAME; user id=.........
Regards.
"Mindy Leslie via droptable.com" wrote:

> I have a second instance set up for a sql server. I'm going
> crazy trying to determine the syntax for the connection string
> for my ASP program.
> Please help
> Mindy Jeanne Leslie
>

ASP - Connection to second instance

I have a second instance set up for a sql server. I'm going
crazy trying to determine the syntax for the connection string
for my ASP program.
Please help
Mindy Jeanne LeslieUsually it would be something like:
...data source=SERVERNAME\INSTANCENAME; user id=.........
Regards.
"Mindy Leslie via droptable.com" wrote:

> I have a second instance set up for a sql server. I'm going
> crazy trying to determine the syntax for the connection string
> for my ASP program.
> Please help
> Mindy Jeanne Leslie
>

Monday, March 19, 2012

ask for ASP connection string to ODBC

do anyone know the connection string for ASP connect to ODBC?
i have created an ODBC for MSSQL named "DMZ-SQL" already.
Thank you very much!!I have an example for DSN-less connection via ADO, so u don't have to always create your Data Source Name in the ODBC properties everytime u move your development.

Set DBConn = Server.CreateObject("ADODB.Connection")
DBConn.Open "Driver={SQL Server};SERVER=127.0.0.1;UID=sa;PWD1234=;DATABASE= Mydatabase"|||Thank you very much!

Sunday, March 11, 2012

AS400 ODBC connection

I was able to successfully create a linked server to AS400 box without
any problem. But now, due to some reason the following query does not
return any data (0 rows)
Select * from openQuery(CWBIS800, 'select * from lib.tb where cmln =
10001001')
whereas the following query does return the correct record.
Select * from openQuery(CWBIS800, 'select * from lib.tb') where cmln =
10001001
I dont like the later query as this basically fetches all the records
from as400 (network traffic) and then applies the where clause on SQL
server side. Any idea how to fix the previous query ? please help
Sandeep Khandelwal
KeyBank
What is the data type for cmln? Did you try the first query
- exactly what is in between the single quotes - using
Client Access or on the AS400 itself?
-Sue
On 17 Sep 2004 12:47:53 -0700, Sandeep.khandelwal@.gmail.com
(Sandeep) wrote:

>I was able to successfully create a linked server to AS400 box without
>any problem. But now, due to some reason the following query does not
>return any data (0 rows)
>Select * from openQuery(CWBIS800, 'select * from lib.tb where cmln =
>10001001')
>whereas the following query does return the correct record.
>Select * from openQuery(CWBIS800, 'select * from lib.tb') where cmln =
>10001001
>I dont like the later query as this basically fetches all the records
>from as400 (network traffic) and then applies the where clause on SQL
>server side. Any idea how to fix the previous query ? please help
>
>Sandeep Khandelwal
>KeyBank

AS400 DB2 connection strings

I am trying to construct a connection string via iSeries OleDb provider. The default list of libraries on the AS400 for my user is fine for production. But in test scenarios the code/data libraries are rolled out through a sequence of test libraries. How do I specify the additional libraries for testing.

I connect fine and can execute sql. the statements like insert into TestLibrary.Table work fine, but the associated trigger code isn't called.

Would it be better to use the .Net Connection set of classes instead. I switched from ODBC to OleDb because of assumed thread safety issues.I don't understand what you're looking for. Can you be more specific? If trigger code isn't called, how is that an SSIS issue?|||Maybe not.

The problem is building a connection string to communicate withe as400 db2. I found other threads in this forum dealing with other issues on this connectivity. The point about the trigger code not executing is because the library on the as400 that contains the trigger code is not part of the default library list for the connecting user.

the question is how to construct the connection string to add additional libraries into the scope of the connection. I was able to do so using ODBC. I wanted to use either the OleDb or the ADO clone iSeries connection stuff to do it as well.|||This link might help: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1061900&SiteID=1