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

Connection Error



Hi, I have currently found an ASP based website that i developed about 3
years ago and am very keen to get it up and running, it's quite a simple
site, however when i try to do anything with the database i have a
problem with the DSN (I Think).

The error i get is something like the following:
[Microsoft][ODBC Driver Manager]
Drivers SQLSetConnectAttr failed.
/homepage/takeregistration.asp line 10.

The code from which this error is obtained is:

<%@ LANGUAGE="VBSCRIPT" %>
<% pageTitle = "Login - www.schurst.co.uk" %>
<!--#include virtual="/homepage/pagetop.txt"-->

<% p_userid = Request.form ("p_userid")
p_pass = Request.form ("p_pass")
p_save = Request.form ("p_save")

set spencerDB = Server.CreateObject ("ADODB.Connection")
spencerDB.Open "spencer" <<<<< LINE 10

sqlText = "select * from members where username = '" & p_userid & "'"

set userSet = spencerDB.Execute(sqlText)
if userSet.EOF then
'No such username so the recordSet is empty
Response.Redirect "/homepage/login.asp?retry=username"
else
'The username is good, now lets check the password
real_password = trim (userSet("password"))
if p_pass = real_password then
'Password is good

Response.Cookies ("isLoggedInAs")("username") =
userSet("username")
Response.cookies("isLoggedInAs") ("first_name") =
userSet("first_name")
Response.cookies("isLoggedInAs") ("last_name") =
userSet("last_name")

if p_save = "yes" then
Response.cookies("isLoggedInAs").expires = #December 31,
2003 00:00:00#
end if
spencerDB.Close
set spencerDB = Nothing

if Request.ServerVariables("HTTP_REFERER") =
"/homepage/chat.asp" then
Response.Redirect "/homepage/chat.asp"
end if

Response.Write "<h2 class='heading'>Login successfull!</h2>"
Response.Write "<p>You are now successfully logged in, use the
menus at the top or bottom to navigate through this site."
else
'Username is not good, but password is wrong
Response.Redirect "/homepage/login.asp?retry=password"
end if
end if
%>
<!--#include virtual="/homepage/pagebottom.txt"-->
</BODY>
</HTML>

This baffles me as i have created the DSN in the advanced tools within
the control panel and selected an appropriate database. I am running
Windows 2003 server edition, using a Microsoft Access database. The same
error occurs with other pages trying to interact with the database.

Any help on this issue will be much appreciated.

Regards

Spencer
*** Sent via Developersdex http://www.developersdex.com ***
Sep 20 '05 #1
1 1732
Spencer Hurst wrote:
Hi, I have currently found an ASP based website that i developed


Already answered over in .db

Please do not multipost Spencer. This is definitely a database-related
question so .asp.db was the perfect group in which to post it. Posting it
here as well did not increase your chances of getting an answer (most of us
subscribe to both groups). On the contrary, if somebody had taken his time
to answer it here, only to find that it was already resolved in the other
group, that person may have been annoyed enough to ignore any future posts
from you, thereby decreasing your chances of getting help in the future.

There are times when you will not be sure which group is most appropriate
(again, this was not one of them), and you will want to post a question to
both groups. In that situation, you should use the cross-posting technique,
rather than posting the same message multiple times. To crosspost, put
a semicolon-delimited* list of the newsgroups to which you wish to post in
the To: header of your post and post it once. It, and any replies to it,
will appear in all the newsgroups in your list. So, if I reply in .asp.db,
my reply will also appear here in .asp.general.

* ... or whatever delimiter is recognized by your news client

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Sep 20 '05 #2

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

Similar topics

4
by: James | last post by:
We've had a recurring problem where all of a sudden we get a DBMSSOCN General Network Error on any page that connects to SQL Server. Then we have to reboot the server and everything works fine...
2
by: Jozef | last post by:
Hello, I'm trying to create a central function that runs a connection to an SQL Server database. The connection etc works, but when I try to call it, I get an error saying "Runtime-Error 91:...
6
by: Chris Szabo | last post by:
I've created a data access layer for a .NET web application. I'm using C# and framework 1.1. I'm getting an error from time to time when I close a connection saying: ...
26
by: Rajeev Tipnis | last post by:
http://support.microsoft.com/default.aspx?scid=kb;en- us;819450 Questions: 1) Is this patch (fix) applicable to the .NET 1.1 Framework as well? That is, if we have Framework 1.1 (On...
5
by: Suresh | last post by:
Hi Guys I have Db2 server installed on remote server. i am connecting to that remote server by using VPN. I want to connect that remote DB2 server instance using my local machine DB2...
8
by: Greg Strong | last post by:
Hello All, The short questions are 1 Do you know how to make DSN connection close in Access to Oracle 10g Express Edition? &/or 2 Do you know how to make a DSN-less pass-through query...
20
by: fniles | last post by:
I am using VS2003 and connecting to MS Access database. When using a connection pooling (every time I open the OLEDBCONNECTION I use the exact matching connection string), 1. how can I know how...
7
by: fniles | last post by:
I am using VB.Net 2003 and MS Access (connecting using OleDBConnection). I read using DataAdapter and DataSet, not DataReader. When many people try to access the database at the same time, I get...
0
by: Robert Avery | last post by:
In VBA/VB6, I had a class (incomplete sample below) that watched and displayed for the user all connection events, so that I could easily see what SQL was taking a long time, and when it freezes, I...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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
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,...

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.