Can't Connect
- From: "Jim Bunton" <jBunton@xxxxxxxxxxxxxxxx>
- Date: Mon, 19 Sep 2005 11:44:58 GMT
Win 2000, sqlServer 2000 Personal edition
Trying ot connect using .asp Vb Script
1. Sql server set to use Windows Authentication
2. Log onto Windows 2000 as Jim Bunton {no password)
3 Server 'Study' running ok
4. sql query analyser
i. "SELECT User_Name > dbo
ii. [using database NorthWind]
"SELECT * FROM Customers" > gives expected result
5. VB script
** BEGIN CODE connect.asp ***
<%
@ LANGUAGE="VBSCRIPT"
%>
<%
Option explicit
response.expires = 0
%>
<!-- #include file="adovbs.inc" -->
<html>
<head>
<title></title>
</head>
<body>
<%
dim Cn, CnStr
Set Cn = Server.CreateObject("ADODB.Connection")
Cn.ConnectionTimeOut = 1
Cn.provider="sqloledb"
response.write "Conn Provider is " & Cn.provider
CnStr="Data Source=Study;Initial Catalog=Norhwind;User
Id=sa;Password=;"
' Tried all sorts of user id's and paswords
'CnStr="Data Source=Study;Initial Catalog=Norhwind;User Id = 'Jim
Bunton';Password=;"
'CnStr="Data Source=Study;Initial Catalog=Norhwind;User Id
=dbo;Password=;"
'CnStr="Data Source=Study;Initial Catalog=Norhwind;User Id =
JimBunton;Password=;"
'CnStr="Data Source='Study';Initial Catalogue='Norhwind';User Id
='Study\Jim Bunton';Password=;"
%>
<p>----------</p>
<%
response.write "Cnstr = " & CnStr
'ERROR ALWAYS OCCURS ON NEXT LINEon the next line
Cn.open CnStr
%>
<p>----------</p>
<%
response.write "The End - ran ok"
%>
</body>
</html>
**** END CODE *****
? what to do??
?? am I missing something 'obvious' out ???
--
Jim Bunton
.
- Follow-Ups:
- Re: Can't Connect
- From: Sue Hoegemeier
- Re: Can't Connect
- Prev by Date: Re: settings for CLICONFG
- Next by Date: Re: Server Does Not Exist or Access Denied error
- Previous by thread: Re: connecting to sql server in another domain in vbs
- Next by thread: Re: Can't Connect
- Index(es):
Relevant Pages
|
Loading