Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 4th, 2004, 11:25 AM
Authorized User
 
Join Date: Jun 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default HTTP Internal Server Error

Hello!
    I am learning ASP programming on my own. When I tried to connect MSSQL Server database IIS returned "HTTP 500 Internal Server Error". I replaced MSSQL with MS Access database the result was the same error. I have created a User DSN connection, IIS and MSSQL server is running perfectly. This Internal server error occurs only when I try to connect to database. Any one please give me the solution.

Arul Kumar.PA
__________________
Arul Kumar.PA
 
Old December 4th, 2004, 01:24 PM
Authorized User
 
Join Date: Dec 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Please post the code used to build the connection.

HTTP 500 Internal Server Error is a generic error message. So it could be anything

 
Old December 4th, 2004, 01:29 PM
Authorized User
 
Join Date: Nov 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default

kindly post the code!

Farzan Q.
BS(TeleCommunication)
Iqra University.
 
Old December 5th, 2004, 07:21 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 184
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Jonax
Default

... and disable friendly error messages in Internet Explorer...

 
Old December 5th, 2004, 11:07 AM
Authorized User
 
Join Date: Jun 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here is the Source code:
------------------------

<%@ LANGUAGE="VBSCRIPT" %>
<%
    Dim Conn
    Dim SSS
    Dim SQL
    set Conn=Server.CreateObject("ADODB.Connection")
    set SSS=Server.CreateObject("ADODB.Recordset")

    Conn.Open "Test;UID=Administrator;PWD=india;"
    SQL = "select * from User_Details"

    SSS.Open SQL,Conn

    Do while Not SSS.EOF
        Response.write "<p>" & SSS("Name")
        Response.write "<p>" & SSS("EMail")
        Response.write "<p>" & SSS("Password")
        Response.write vbcrlf
        RS.MoveNext
    Loop

    SSS.Close
    Conn.Close
%>

** Kindly recommend me some websites to learn ASP and MSSQL Server **

Arul Kumar.PA
 
Old December 5th, 2004, 11:13 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 184
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Jonax
Default

Did you disable the friendly error messages? And did you get a more detailed error description?

 
Old December 5th, 2004, 11:17 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 184
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Jonax
Default

http://support.microsoft.com/default...;en-us;Q294807

 
Old December 5th, 2004, 10:53 PM
Authorized User
 
Join Date: Jun 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hai!

    :)Thanks for your replies. I disabled friendly error messages in internet explorer and got the following error.

ERROR MESSAGE:
   --------------

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

/SDB.asp, line 9


    As the error said Data source name not found I checked with my ODBC connections. All was fine. I recreated the DSN and finally did "Test Data Source" and result was as follows


AS RESULT OF TESTING:
---------------------

Microsoft SQL Server ODBC Driver Version 03.85.1022

Running connectivity tests...

Attempting connection
Connection established
Verifying option settings
Disconnecting from server

TESTS COMPLETED SUCCESSFULLY!

       The Data Source testing was successfull, the data source name that is given in the ASP file is the same as in ODBC, then what might be the problem. Is there any problem with the source code posted above. Any solutions please!

Arul Kumar.PA
 
Old December 5th, 2004, 11:13 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

IF I were you, I wouldn't have gone for a DSN based connection.

DSN, DSN-Less and OLEDB connection strings compared - adOpenStatic.com

Standard security connection string.
oConn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
           "Dbq=c:\somepath\mydb.mdb;" & _
           "Uid=admin;" & _
           "Pwd="

Hope that helps.
Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old December 5th, 2004, 11:47 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 184
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Jonax
Default

Vijay: arulkumar is using MSSQL...;)

arulkumar: Check this site: http://www.connectionstrings.com/






Similar Threads
Thread Thread Starter Forum Replies Last Post
HTTP/1.1 500 Internal Server Error Dmitriy General .NET 0 February 26th, 2008 04:50 PM
Http/1.1 500 Internal Server Error abinashpatra ASP.NET 1.0 and 1.1 Basics 17 May 10th, 2007 02:06 AM
HTTP 500 - Internal server error helmsly BOOK: Beginning ASP 3.0 11 November 8th, 2006 03:15 AM
HTTP 500: Internal Server Error cyberddindia Classic ASP Databases 4 October 5th, 2006 11:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.