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

Can't connect

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 LINE
Cn.open CnStr
'Error Type:
'(0x80004005)
'Unspecified error
'/myweb/mywebs/connect.asp, line 35
%>
<p>----------</p>
<%
response.write "The End - ran ok"
%>

</body>

</html>

**** END CODE *****

? what to do??
?? am I missing something 'obvious' out ???

--
Jim Bunton

Sep 19 '05 #1
1 1714
Jim Bunton (jB*****@BlueYonder.co.uk) writes:
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)
You're a brave man!
'CnStr="Data Source='Study';Initial Catalogue='Norhwind';User Id
='Study\Jim Bunton';Password=;"


That is not likely to be correct. User Id and Password is for SQL
authentication, and SQL logins usually don't have \ in them. To login
with Windows authentication, specify "Integrated Security=SSPI", or
Trusted_connect=Yes.

And spell Northwind correctly. :-)

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

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

Sep 19 '05 #2

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

Similar topics

1
by: Jordy | last post by:
Environment: Sun servers running solaris 2.8 Php 4.3.6 Apache 1.3.29 Mysql 4.1.1 phpMyAdmin 2.6.0-alpha1 phpAds 2.0 PhpMyadmin and phpAds don't succeed to connect the MySql database when
0
by: Ryan Stewart | last post by:
I'm running MySQL server on a WinXP box at home. I have a cable modem/router. I've set up port forwarding on port 3306 to the machine running MySQL. I can connect locally just fine, but when I try...
3
by: Pugi! | last post by:
On a freshly installed Fedora C3 (incl. webserver apache php mysql) i get the following problem when connecting to mysql through a browser (phpMyAdmin): : #2002 Can't connect to local MySQL...
2
by: xiuchuanli | last post by:
I install Fedora 4 with web server, after that I installed mysql 5.0.15. Now I can connect to mysql from command line and mysql-administrator and mysql-query-browser. But when I try to test to...
0
by: xiuchuanli | last post by:
I install Fedora 4 with web server, after that I installed mysql 5.0.15. Now I can connect to mysql from command line and mysql-administrator and mysql-query-browser. But when I try to test to...
3
by: dmcquay | last post by:
Hi, I am setting up MySQL on a development box. I have set it up and can connect from localhost, but I cannot connect from another computer on the network. I have narrowed down the problem...
0
by: Clodoaldo Pinto | last post by:
Can't connect to postgresql server php error log message: PHP Warning: pg_connect() : Unable to connect to PostgreSQL server: could not connect to server: Permission denied\n\tIs the server...
4
by: d3vkit | last post by:
Okay so I am at a loss here. I have a website that I've previously had no trouble connecting to the mysql DB on. I have an include to a connect file with the relevant connection info, and it was...
5
by: scorpionbilli | last post by:
Hi, The local mysql server is running on my Macbook. I can access it through the console client: $ mysql -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL...
1
by: sasimca007 | last post by:
Hi friends, I installed mysql in ubuntu but, i don't know how to connect to that mysql. Actually we connect to postgresql by psql command, but when i tried to connect mysql with...
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: 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...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.