Solved

Dreamweaver cs4 classic asp dsn sql 2008 http 500 error

Posted on 2011-02-13
6
693 Views
Last Modified: 2012-08-13
Just starting out with classic asp (need to support an old website) Getting a HTTP 500 error when I add a recordset to the webpage. Works fine with an equivilent MS Access database.

Sql DSN passes test connection and passes test/shows recordset, but the very fact the recordset is attached to the page throws the error even before trying to place a field. The driver for the sql 2008R2 system dsn is sql client (have tried sql server, same problem)

Can anyone point me in the right direction, may thanks
0
Comment
Question by:downehouse
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 34882584
Start by turning off "Show Friendly Http Errors" in your browser. That way you will be able to see the actual error message rather than the generic 500 message.
0
 

Author Comment

by:downehouse
ID: 34886540
Thanks, good point, but had already done this, what I had not done was to change IIS 7.5 'Send Errosrs to Browser' setting to true.  Having done this the error is with the DSN on line Recordset1_cmd.ActiveConnection. However the DSN checks out OK when tested at the created stage.

I have the following code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="Connections/Merlin.asp" -->
<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows

Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConnection = MM_Merlin_STRING (**** error on this line)Recordset1_cmd.CommandText = "SELECT BulletinID, BulletinDate, BulletinBody, PostedBy FROM dbo.BULLETIN"
Recordset1_cmd.Prepared = true

Set Recordset1 = Recordset1_cmd.Execute
Recordset1_numRows = 0
%>

The include file code is as follows..
<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_Merlin_STRING
MM_Merlin_STRING = "dsn=Merlin;"
%>

Any help appreciated (Runing Dreamwearver CS4 on Win 7, with SQL server 2008 R2)
0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 34886877
What is the error?
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

Author Comment

by:downehouse
ID: 34887058
Sorry..

error '80040e4d'

/avalon/index_tmp.asp, line 9
0
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
ID: 34887080
Have you tried with a DSN-less connection?
0
 

Author Comment

by:downehouse
ID: 34887932
Have now, it works, shame DSN would not play ball.  Thanks for the quick responses.
0

Featured Post

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question