Using ADODB.stream To Get Results From A Url Query
I have an asp page that needs to display the string that is returned from a
cgi file.
As an example, if you enter http://mydomain.com/mycgi.cgi?98127398 in to a
browser, it will display YES or NO
I need to have my asp code query this url, get the resulting string, then
act upon it (basically use the answer to display a nice big tick or a big
cross). Code:
View Replies
ADVERTISEMENT
I am using the code below to ensure that a download will be sent to the user as a save/open dialog box and not open up in the browser. However I get one of a few different issues.
1. Sometimes the when you click save the box just dissapears and you never get to choose where to save it. And then don't get the file!
2. If you get past the first problem (seems to be unique to pdf's) and can select where you want to save the file, it then doens't actually download the file and the box just dissapears again!
3. If you get past both of these, documents are often corrupt!
Any idea what could be causing these? The server has MDAC 2.8 installed, and it works slightly better on our local testing server Win2k than it does on the live Win2k server! All very odd! Code:
View Replies
View Related
After the latest security update, is it still possible to use adodb.stream
on the server side?
View Replies
View Related
We have an application, written in ASP, that uses the ADODB.Stream to be
able to open files and write byte arrays to the Response object. If one of
our administrators patches the web servers this application runs on in
Windows Update, I'm screwed, right? You've essentially just disabled this
COM object, for not only its evil purposes, but its useful ones?
View Replies
View Related
I am using ADODB.Stream for downloading the files on user machine. The code works fine when filesize is less than 10 MB. But if file size is more than 10 MB then it doesn;t get download. Can anyone tell what is the problem. I have to user some different component.
View Replies
View Related
I am trying to secure .pdf files by having users login and based on UserID, allow access to certaing .pdf's.
I have tried it a few different ways using different file types and their corresponding contenttype and nothing happens. I even used the same example from microsoft.com and I get "page cannot be displayed"....
View Replies
View Related
In Windows 2000 IIS 5 SP3 this:
http://support.microsoft.com/?scid=kb;en-us;276488
is not working. No error but wants to save binary.asp to disk and can't. I have it in a High Isolation Application.
View Replies
View Related
I'm trying to create a page that uploads a file. I get an error message saying ADODB object Stream is not available in my server. How do I upgrade my ADODB library?.
View Replies
View Related
I`m writing a little routine that captures the data from a form submit (ie a picture) and then at the back end the asp will saved it back out into a file on the server.
I can capture the file fine and display the binary data to the screen.. but now I`m trying to write the data back into a file on the server. After a bit of searching around on the net I found that most people where suggesting using the ADODB.Stream functions.
So this is what I've got but for some reason when I go to write the binary variable it complains. Code:
View Replies
View Related
I have an ASP page that downloads file with the ADODB.Stream object.
I've found that if the user click cancel in the "Save file as" window or
during the downloading, the download is no more available, the page hangs
over and and the session have to be closed. (In some cases you have to Cancel
more than one time the download process to rise up this error).
I've experienced this problem, as a user, with many major webmail services
too!
View Replies
View Related
When trying to load a file using ADODB.Stream, LoadFromFile method I get the following error:
Safety Settings on this computer prohibit accessing a data source on another computer
I'm running windows server 2003. I have the site security set to "Local Intranet"
Any Suggestions?
View Replies
View Related
I use the Stream method to serve certain file types to the user. If the
type is pdf, it opens in the browser fine. My problem is with those
that the browser doesn't have plug-ins such as ppt, word, etc. it
prompts to choose Open/Save/Cancel and defaults the filename to the ASP
page serving the content. ie. BinarySend.asp -> BinarySend.doc,
BinarySend.ppt.
If I use
Response.AddHeader "content-disposition", "attachment;filename=" &
sFileName then it defaults the filename to the name I specify but
always prompt a download instead of opening directly.
Is there another way to default the filename in situation like this?
View Replies
View Related
It involves using ASP/VbScript and ADODB.Stream to read binary data from a *.DOC or *.RTF
file and then send it to the user with Response.ContentType and BinaryWrite.
Everything works fine until I try to Replace() certain strings in the *.RTF
file with my own data. I'm assuming Replace() is choking on the binary characters, or
incorrectly thinking 0x00 values are marking end of string. Code:
View Replies
View Related
I wanna read binary data from database with ADODB.Stream object. So I wrote code..
---------
<%
query = "SELECT * FROM Categories"
adoDB.DefaultDatabase = "Northwind"
adoRs.Open query, adoDB, 1
Set rec = Server.CreateObject("ADODB.Record")
'read [Picture] column.
rec = adoRs(3)
------------
And the 'rec' TypeName() is 'Byte()'
But I can't get it to ADODB.Stream. How Can I do? Or Can I read binary column to another way?
View Replies
View Related
I use the code below to authorise the download of certain files.
Thus, instead of linking to the file in a wwwroot directory, I link to
this code with the filename as a parameter, and the script streams the
file if the user is authorised.
This has worked fine on PDFs, DOCs, XLS, etc. until today, and 18MB
file presents the error message 'format error: not a pdf or corrupt'.
Is there a file size limit, or a default that needs overridden? Any
thoughts? Code:
View Replies
View Related
I'm stuck on trying to display a single row from a query I'm executing.. it was fairly easy in PHP and I'm sure it is in ASP too, I'm just not sure what to code.. I couldn't find anything on the web that was simple.
If anybody has some suggestions on how to display just the one row that is returned from the query that would be great for now. I'm looking to eventually add 'LIKE' to the query to allow for similar names/passwords to be displayed.. but for now this should do. Here's the code:
View Replies
View Related
I want to write all the query results onto a file so that it is all ready to give to the client.
I am currently writing a query to pull out certain orders in a day and i want to write these results directly to a text file.Also this text file will be obviously placed on the server..is there any way of creating this file on the computer you are accessing this web page on?
View Replies
View Related
I need to create asp page witch has a form at top of the page. This is the search form. Then I need to present the search results from database query on the bottom of the page as a table. That table has about dozen columns. Some column values can be modified and saved to the database and some column values has to be modified and saved from another page.
Search table is no problem but I have problems getting the results table to work right... Query results are in recordset.
I need some advice on how to do the results table on the best way!
So far I am thinking on creating a form on every row of results and posting the changes of values to save.asp page where I would save the modifications to database.
For the values witch have to be modified on another page I would add a link something like this... Code:
View Replies
View Related
How can I get this line to work? I am trying to get the results entered in a form to be part of my query. I am able to get the form results but I get a error stating Syntax error (missing operator) in query expression 'Assignee = Tom Jones'.Below is the line where the error occurs
Session("dbWhere") = "Assignee = " & Request.Form("assignsearch")
View Replies
View Related
I'm trying to get results from a number of areas via one command string.for example ?location=devon retrieves everything in devon but I've only got a link for the whole south west so I need to send ?location=devon or cornwall or dorset etc. altogether.Is there a way I can do this without changing the asp page or do I have to only search one field at a time.
View Replies
View Related
I am working on a classic ASP application. This application needs to run an SQL query and take the result set and stream it into an XCEL spreadsheet for processsing by the users. Is there an ASP method of third party product to do this?
View Replies
View Related
I am trying to design a page that displays data from a query in groups of a field in the where clause and then displays a 'total' per each group. Code:
View Replies
View Related
Has anyone experience with rendering CrossTab Query results with ASP?
For example, using this SQL:
TRANSFORM Count(threads.threadid) AS CountOfthreadid
SELECT threads.threadSeverity, Count(threads.threadid) AS [Total Of threadid]
FROM threads
GROUP BY threads.threadSeverity
PIVOT threads.threadStatus;
This returns the following in Access:
[threads_Crosstab] [threadSeverity] [Total Of threadid] [Analyzing] [Closed] [Coding] [Open] [Re-Testing]
[Medium ] [1] [1]
[Not Set] [160] [1] [122] [1] [35] [1]
I want to create a HTML table to display the results in my webpage. However, I don't belive the output from a "Transform" is a true recordset. When I request the names of the fields in the recordset, I am getting data from the "rows".
Is there standard way to display these types of queries? How does one access the data in a crosstab query? Are there ojbect classes to handle this?
View Replies
View Related
I'm attempting to limit a query which is being ordered by a date field to 10 records. The date field contains duplicate values, which are sorted from most recent, back.
However their suggestion of sorting by a secondary field is not providing acceptable results (it returns all the rows in the database). Does anyone have any suggestions of another way around this?
View Replies
View Related
After commands like:
tmpDBconn.Execute("DELETE * FROM mytable WHERE rc_id = 10" )
How do I check for errors?
Is there a way to check the results?
OR:
Set rsCatCount = tmpDBconn.Execute("SELECT COUNT(*) FROM cat WHERE key_id = 10 AND cat_id = 6")
How do I get the count? Do I use rsCatCount(0)?
View Replies
View Related
here's what i want to do. from an asp page, perform a search on a
table in access. i have used sql code in the asp page itself, but i'd
rather execute a query in access. i have success in running any query
(basic SELECT, SELECT with conditions _other_ than LIKE, etc..) for
some reason, when i execute the query below from the asp page, i get
no results.
the search.asp page just has a text box in a form that submits the
srchBOX field to the results.asp page.
here's the asp code from the results.asp page: Code:
View Replies
View Related
I am trying to search through an access database for tickets createded with in a certin date. I am using the below code.
strdate = DateAdd("d", -2, Now())
sqlstr="SELECT * FROM Incidents WHERE TicketDate BETWEEN #"& Now() &"# AND #"& strdate &"# ;"
I verify the query with response.write and get the following.
SELECT * FROM Incidents WHERE TicketDate BETWEEN #15/07/04 19:19:32# AND #13/07/04 19:19:32# ;
I know there are 100% tickets within this date. Yet my query returns nuthing. Please help i've searched this forum for other peoples code looking for examples but end up with the same result.
View Replies
View Related
I have a page which streams an Excel spreadsheet to the user. It has worked
fine for 12mths or more, but recently I found out that it wasn't working. I
suspect the problem lies with IIS, but I'm not sure...
When the user submits a form, the page should stream the file to the user -
the user is presented with a standard Open/Save/Cancel dialog, which the
would ordinarily save to their HDD. I have updoaded the code from the live
server to my development machine (IIS5.1) - and this same code works fine.
However, on the live server (IIS6), the user is presented with the dialog
box, but rather than listing myfile.xls, it lists mypage.asp as the file to
be downloaded.I think this must be an IIS6 issue but I don't know what. Some time before
the problem was noticed, work had been done on the live server, but AFAIK
nothing was done that was *intended* to affect this application.
View Replies
View Related
I'm using streams to upload a file. I get an error 800a0bbc write to file failed.
I've looked on support.microsoft.com and groups.google.com.
No luck on what a 800a0bbc error is.
View Replies
View Related
Does anyone know how to create an attachment using a stream in classic
ASP.I can see that it can be done in ASP.Net as per the article below:
Initializes a new instance of the Attachment class with the specified
stream and name.
http://msdn2.microsoft.com/en-us/library/6sdktyws.aspx.
View Replies
View Related
I'm using
file.OpenAsTextStream(ForReading, _
TristateUseDefault)
and then i read some lines.
Line = TextStream.readline
Then when i finished reading it i need to go to the begiining and read some
lines again.But i dont see how to go back to the begining.
I mean, Is there a way to go back to the first line of the file if i
allready read some lines
View Replies
View Related
Ok, I'm stumped on something that really shouldn't be this hard. I've
created some cool code to transform a dataset via XSLT into SpreadsheetML
(XML for Excel) and I'm storing the physical file on a file server. Now... I
currently provide a hyperlink to view/save the file, but this won't work
outside the network.
So, I've been working on making this
hyperlink/linkbutton/button/whatever stream the file back to the user. How
in the name of Zeus's butthole do I do this?
So, in simpler terms; how do I take a physical file and stream the sucker
back? Ideally, I'd like this to work just like it does now with the physical
link to the file. Click the link, it prompts you to save/open/cancel.
Clicking Open pops up Excel and looky-looky, you see the file.
View Replies
View Related
The problem is that in XP SP2, the IE instance opened for the vbscript only
page no longer closes when Excel is closed. The user has to manually close
this window. This didn't happen in XP SP1. Obviously there is a security
change, but I have been unable to determine how to reverse it.
Does anyone know how I can get the IE instance to close when Excel closes in
XP2 SP2?
View Replies
View Related