Can"t connect
am 19.09.2005 13:36:22 von Jim BuntonWin 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 'tudy' running
4. sql query analyser
"SELECT User_Name > dbo
[database NorthWind]
"SELECT * FROM Customers" > gives exprcted result
5. VB script
** BEGIN CODE connect.asp ***
<%
@ LANGUAGE="VBSCRIPT"
%>
<%
Option explicit
response.expires = 0
%>
<%
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 = Jim
Bunton;Password=;"
'CnStr="Data Source='Study';Initial Catalogue='Norhwind';User Id =
'Jim Bunton';Password=;"
%>
----------
<%
response.write "Cnstr = " & CnStr
'ERROR ALWAYS OCCURS ON NEXT LINEon the next line
Cn.open CnStr
%>
----------
<%
response.write "The End - ran ok"
%>
**** END CODE *****
? what to do??
?? am I missing something 'obvious' out ???
--
Jim Bunton
13 Westbourne Road
Trowbridge Wilts BA14 0AJ
01225 765 541
07919 283 968