Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scary Code! 1

Status
Not open for further replies.

stevemarsh99

Technical User
Aug 10, 2005
88
GB
Hey Guys n' Girls! Wondered if you could help...situation as follows:

Just started doing some in house hosting so I slapped our new website onto it and I get:

db" %>

on the default.asp page (and on some others) but its only when you view it from a client. If you look on the source code on the server directly, the annoying code is not there, but you look at the source code on the client (asp rendered page) it is there

HELP!!

Thanks :)
 
But there is not in the page that resides on the server, just when its client side the code is created and siplayed BEFORE the start of the document?
 
Well yes to the connectionscript file if that is what you mean? But i cant see the error code in the source code of the page!

Eeek!

Steve
 
OK I have found out that the code that is causing the problem is definately being generated CLIENT side, it does not reside in the ORIGINAL source code of the page,

Is there a setting on the web server or IIS that would make this:

'db" %>'

bloody code turn up? Just need to remove!!!

Thanks if you know
Steve
 
The correlation is only on the pages that use this one connection script file. If it uses the connection script file then the code appears at the top of the page.
The script file seems fine (and it grabs the data from the database so it seems to work fine!) but it must be linked the the file:

Code:
<%
' FileName="Connection_ado_conn_string.htm"
' Type="ADO" 
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_mainCONNECTION_STRING
MM_mainCONNECTION_STRING = "Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Inetpub\[URL unfurl="true"]wwwroot\database\NEW_DB\main_DB1.mdb"[/URL]
%>

Thoughts?
 
My GBP £0.1 worth is that in the main page you'll find a debugging "response.write" somewhere above the DTD.

Or because obviously it's the last few characters connection string there may well be a line that has been only partially deleted.

Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
People Counting Systems

So long, and thanks for all the fish.
 
You can try adding this.

Code:
<%@ Language=VBScript %>
<%Response.Buffer = True%>
<html>
<head>
<meta NAME="GENERATOR" Content="Microsoft FrontPage 5.0">
<title>New Page 1</title>
</head>
<body bgcolor="#ffffff">

<script LANGUAGE="vbscript" RUNAT='Server'>

Or add this...

Code:
<html>
<head>
  <title>New Page 1</title>
</head>
<body>

<%
' Open a DNS-Less connection to the database

set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Data Source=" & Server.Mappath("mytest.mdb") & ";Provider=Microsoft.Jet.OLEDB.4.0;"

set rs = Server.CreateObject("ADODB.Recordset")

sql="something"
'for some strange reason, the next line does something!
'and so far is required for page to display properly.
rs.CursorLocation = 3  ' adUseClient
ON ERROR RESUME NEXT
rs.Open sql, conn

rs.PageSize = 1
 intPageCount = rs.PageCount

...
...
...


AccessGuruCarl
Programmers helping programmers
you can't find a better site.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top