Solved

Dreamweaver cs4 classic asp dsn sql 2008 http 500 error

Posted on 2011-02-13
6
689 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
  • 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
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.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

863 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now