|
 |
asp_databases thread: is it my server, or script error
Message #1 by "craig" <cn60@m...> on Sun, 25 Aug 2002 16:18:50
|
|
error--SCRIPTING OR SERVER ERROR
I have a script that i got from iis5 to view,delete records, and sort
records in a field. in iis5 it works fine, i copied it exactly as i had
it in iis5. the only thing i changed was the strProvider to
ConnectionString( i did this because my host gave me this as my
dsnlessconnection) , i changed this throughtout. i can view the database
fine, but when i press delete, i get the error, i can press back and then
refresh and it will delete fine. can someone explain what is going on?
thanks craig
<% @language=vbscript %>
<html dir=ltr>
<head>
<title> Replace this text with a title. </title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<%
if request.form("sort")<> "" THEN
StrSort=request.form("sort")
ELSE
StrSort="TB1 ASC"
END IF
strQuery="SELECT * FROM SampleDb ORDER BY " &StrSort
'Database path statement for restricted viewing of the database.
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=D:\64.227.68.95\infodb.mdb;"
'Database path statement to allow visitors to view the database.
'strProvider="DRIVER=Microsoft Access Driver (*.mdb); DBQ=" &
Server.MapPath("iisadmin") & "\tour\sampledb.mdb;"
IF Request("ID") <> "" THEN
strIDNum=Request("ID")
set objConn = server.createobject("ADODB.Connection")
objConn.Open ConnectionString
set cm = Server.CreateObject("ADODB.Command")
cm.ActiveConnection = objConn
cm.CommandText = "DELETE FROM SampleDb WHERE ID = " &strIDNum
cm.Execute
END IF
Set rst = Server.CreateObject("ADODB.recordset")
rst.Open strQuery, ConnectionString
%>
<h1> Replace this text with a page heading. </h1>
<form name=viewdb.asp action=viewdb.asp method=post>
<table border=1 cellspacing=3 cellpadding=3 rules=box>
<%
ON ERROR RESUME NEXT
IF rst.EOF THEN
Response.Write "There are no entries in the database."
ELSE%>
<tr>
<%
Response.Write "<td width=200><center>Delete Record</center></td>"
FOR i = 1 to rst.Fields.Count -1
Response.Write "<td width=200><input name=sort value=" & rst
(i).Name & " type=submit></td>"
NEXT
WHILE NOT rst.EOF %>
<tr>
<%
Response.Write "<td align=left valign=top
bgcolor='#ffffff'><a href=viewdb.asp?id=" & rst(0) & ">Delete</a></td>"
FOR i = 1 to rst.fields.count - 1
Response.Write "<td align=left valign=top
bgcolor='#ffffff'>" & rst(i) &"</td>"
NEXT
rst.MoveNext
WEND
END IF
%>
</table>
</form>
</body>
</html>
Message #2 by "Ken Schaefer" <ken@a...> on Mon, 26 Aug 2002 13:23:35 +1000
|
|
What is the *exact* error and number? WHat line is the error occuring on?
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "craig" <cn60@m...>
Subject: [asp_databases] is it my server, or script error
: error--SCRIPTING OR SERVER ERROR
:
: I have a script that i got from iis5 to view,delete records, and sort
: records in a field. in iis5 it works fine, i copied it exactly as i had
: it in iis5. the only thing i changed was the strProvider to
: ConnectionString( i did this because my host gave me this as my
: dsnlessconnection) , i changed this throughtout. i can view the database
: fine, but when i press delete, i get the error, i can press back and then
: refresh and it will delete fine. can someone explain what is going on?
:
: thanks craig
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #3 by "craig" <cn60@m...> on Mon, 26 Aug 2002 14:59:42
|
|
that is the error i am receiving. ---**server or scripting error**-----
no line is given to see this in action go to coppertan.info/viewdb.asp
> What is the *exact* error and number? WHat line is the error occuring on?
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "craig" <cn60@m...>
Subject: [asp_databases] is it my server, or script error
: error--SCRIPTING OR SERVER ERROR
:
: I have a script that i got from iis5 to view,delete records, and sort
: records in a field. in iis5 it works fine, i copied it exactly as i had
: it in iis5. the only thing i changed was the strProvider to
: ConnectionString( i did this because my host gave me this as my
: dsnlessconnection) , i changed this throughtout. i can view the database
: fine, but when i press delete, i get the error, i can press back and then
: refresh and it will delete fine. can someone explain what is going on?
:
: thanks craig
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #4 by Berkay Mese <berkaymese@y...> on Mon, 26 Aug 2002 07:21:07 -0700 (PDT)
|
|
Did you view the event log for error(s)?
For deleting the records, do you post the page to
itself? send a code snippet and then we can have a
look at it.
Berkay
--- craig <cn60@m...> wrote:
> that is the error i am receiving. ---**server or
> scripting error**-----
> no line is given to see this in action go to
> coppertan.info/viewdb.asp
>
>
>
>
> > What is the *exact* error and number? WHat line is
> the error occuring on?
>
> Cheers
> Ken
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> From: "craig" <cn60@m...>
> Subject: [asp_databases] is it my server, or script
> error
>
>
> : error--SCRIPTING OR SERVER ERROR
> :
> : I have a script that i got from iis5 to
> view,delete records, and sort
> : records in a field. in iis5 it works fine, i
> copied it exactly as i had
> : it in iis5. the only thing i changed was the
> strProvider to
> : ConnectionString( i did this because my host gave
> me this as my
> : dsnlessconnection) , i changed this throughtout. i
> can view the database
> : fine, but when i press delete, i get the error, i
> can press back and then
> : refresh and it will delete fine. can someone
> explain what is going on?
> :
> : thanks craig
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
Message #5 by "Ken Schaefer" <ken@a...> on Tue, 27 Aug 2002 11:17:48 +1000
|
|
I get "file not found"
It is possible that the server administrator has changed the way that IIS
reports errors back to the browser (ie sends back a canned message rather
than a detailed description).
Can you run this file on a local IIS machine and report the error to us? Or
are you running this locally? if so, can you post some code please?
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----- Original Message -----
From: "craig" <cn60@m...>
To: "ASP Databases" <asp_databases@p...>
Sent: Monday, August 26, 2002 2:59 PM
Subject: [asp_databases] Re: is it my server, or script error
: that is the error i am receiving. ---**server or scripting error**-----
: no line is given to see this in action go to coppertan.info/viewdb.asp
:
:
:
:
: > What is the *exact* error and number? WHat line is the error occuring
on?
:
: Cheers
: Ken
:
: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: "craig" <cn60@m...>
: Subject: [asp_databases] is it my server, or script error
:
:
: : error--SCRIPTING OR SERVER ERROR
: :
: : I have a script that i got from iis5 to view,delete records, and sort
: : records in a field. in iis5 it works fine, i copied it exactly as i had
: : it in iis5. the only thing i changed was the strProvider to
: : ConnectionString( i did this because my host gave me this as my
: : dsnlessconnection) , i changed this throughtout. i can view the database
: : fine, but when i press delete, i get the error, i can press back and
then
: : refresh and it will delete fine. can someone explain what is going on?
: :
: : thanks craig
: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:
|
|
 |