473,387 Members | 1,779 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,387 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 2012

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?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.