473,289 Members | 1,923 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

"the link could not be saved" error

I have two ASP pages. They basically query a database, and spit out the
information as plain text in CSV format.

The first has the SQL query hardcoded into it. The second takes a SQL
query from a webform.

Now, the hardcoded results, I can click "Save Page As" when the results
come up and save it as a text file.

The other, while it seems to be the same results exactly, gives me an
error when I try to save the page locally: "The link could not be saved.
The web page might have been moved or had it's name changed." !?!?

The page has not been moved, nor had it's name changed. In fact, what's
sent back to the browser in each case if virtually (if not actually)
identical.

What's the problem?
[begin code from page that cannot be saved]

<!--#include file="path/to/datasource.asp" -->
<%
response.ContentType="text/plain"
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open sDataSource

Dim sql
Dim count
sql = Request.Form("sql")

Set objConn = oConn.Execute(sql)

fieldCount = ((objConn.Fields.Count) - 1)

Do Until objConn.EOF
For count = 0 to fieldCount
Response.Write "'" & objConn(count) & "'"
If count <> fieldCount Then
Response.Write ","
Else
Response.Write VbCr
End If
Next
objConn.MoveNext
Loop

%>

[end code]
[begin code from hardcoded page that can be saved]

<!--#include file="path/to/datasource.asp" -->
<%
response.ContentType="text/plain"
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open sDataSource
sql = "SELECT TABLE1.StudentFirstName, TABLE1.StudentLastName, "
sql = sql & "TABLE1.StudentEffectiveEnrollmentDate, TABLE1.StudentTel,
TABLE1.StudentAddress1,"
sql = sql & "TABLE1.StudentAddress2, TABLE1.StudentCity, TABLE1.StudentZip,"
sql = sql & "TABLE2.InventoryKitID,TABLE2.InventoryKitItem1ID, "
sql = sql & "TABLE2.InventoryKitItem2ID,TABLE2.InventoryKitIte m3ID,"
sql = sql & "TABLE2.InventoryKitItem4ID,TABLE2.InventoryKitIte m5ID,"
sql = sql & "TABLE2.InventoryKitItem6ID "
sql = sql & "FROM TABLE1 INNER JOIN TABLE2 ON "
sql = sql & "TABLE1.StudentID = TABLE2.InventoryKitStudentID "
sql = sql & "WHERE TABLE2.InventoryKitInventoryKitStatusID = 1 AND
TABLE2.InventoryKitStudentID <> 0 "
sql = sql & "ORDER BY TABLE1.StudentLastName"

Set objConn = oConn.Execute(sql)

Dim X
X = 1

Response.Write "'Last Name',"
Response.Write "'First Name',"
Response.Write "'EED',"
Response.Write "'Phone',"
Response.Write "'Address 1',"
Response.Write "'Address 2',"
Response.Write "'City',"
Response.Write "'Zip',"
Response.Write "'Kit',"
Response.Write "'CPU',"
Response.Write "'Monitor',"
Response.Write "'Printer',"
Response.Write "'Printer Cable',"
Response.Write "'Curcuit Breaker',"
Response.Write "'Headphones"&VbCr

Do Until objConn.EOF
Response.Write "'"&objConn("StudentLastName")&"',"
Response.Write "'"&objConn("StudentFirstName")&"',"
Response.Write "'"&objConn("StudentEffectiveEnrollmentDate")& "',"
Response.Write "'"&objConn("StudentTel")&"',"
Response.Write "'"&objConn("StudentAddress1")&"',"
Response.Write "'"&objConn("StudentAddress2")&"',"
Response.Write "'"&objConn("StudentCity")&"',"
Response.Write "'"&objConn("StudentZip")&"',"
Response.Write "'"&objConn("InventoryKitID")&"',"
Do Until X = 7
If objConn("InventoryKitItem"&X&"ID") > 1 AND
objConn("InventoryKitItem"&X&"ID") < 999999Then
sql = "SELECT InventorySerialNumber FROM TABLE3 WHERE InventoryID="
sql = sql & objConn("InventoryKitItem"&X&"ID")
Set objConn2 = oConn.Execute(sql)
Response.Write "'"&objConn2("InventorySerialNumber")
Else
Response.Write "'"
End If
X = X + 1
If X <> 7 Then
Response.Write "',"
Else
Response.Write "'" & VbCr
End If
Loop
X = 1

objConn.MoveNext
Loop
%>
[end code]
--
Sugapablo :: ru********@sugapablo.com
http://www.sugapablo.com | ICQ:902845

Jul 19 '05 #1
0 2011

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Dave Hammond | last post by:
I recently noticed the stylesheet link in an html page had the href set to a PHP script, as in: <LINK REL="stylesheet" href="some_css.php" type="text/css"> Presumably the file being referenced...
5
by: F. Barth | last post by:
Hello, I've posted this problem to one other newsgroups, and gotten some diagnostic help, but I still need a solution. The full text of the message box is: "The field is too small to accept the...
10
by: Ian Lazarus | last post by:
Hello. How do "unresolved token" link errors occur. How do I fix them? Linking... LINK : error LNK2020: unresolved token (0A000015) ??_7type_info@@6B@ LINK : error LNK2020: unresolved token...
8
by: Lars-Erik Aabech | last post by:
Hi! We've got an ASP.NET application that runs swell on development PC's and one live production server. Another prod. server though crashes a couple of times a week. Either something that...
6
by: Jofio | last post by:
I have a .h (header file) linked using #include<...>. I also have a .cp file which i don't know how to include in the header of my "main" file. I have the following c++ file. The file names are:...
23
by: deathtospam | last post by:
A day or two ago, I wrote a quick ASPX page with a CS codebehind using Visual Studio .NET 2005 -- it worked, I saved it and closed the project. Today, I came back to the project, reopened the...
9
by: Ecohouse | last post by:
I have a main form with two subforms. The first subform has the child link to the main form identity key. subform1 - Master Field: SK Child Field: TrainingMasterSK The second subform has a...
1
by: deane.barker | last post by:
Is there any recommended solution to this error message? I get it *all the time.* It's seemingly random, but it obviously happens right after I change some code so a page or the app recompiles....
10
by: Roger | last post by:
ms-access97 & sql server2005 two tables tblItem tblItemFeature form frmItem contains subform frmItemFeature each form is based on their respective table creating new record and filling in...
6
by: TC | last post by:
Hey All, I'm receiving a weird error in IE now: "The XML page cannot be displayed" This is even with the simplest of pages that I previously could view. Any ideas?
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.