I have stolen code from another thread in this forum that I am attempting to modify. The original code uses a Microsoft Access database file but I can't create one cos I don't have Microsoft Access. Instead I am using Microsoft Works to create a dBASE IV .dbf file.
This is the code i have attempted to use but it doesnt work. Code:
I cant find out how to get this to work...i got this bit of code.. --------------------------------------------
Code: dim objXMLHTTP dim URL
URL = "http://www.yahoo.com" 'the url that you want to pull html from
Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP") 'create the
xmlhttp object objXMLHTTP.Open "GET", URL, false 'use the open command to get the url objXMLHTTP.Send
'TO GET HEADERS 'response.write objXMLHTTP.getAllResponseHeaders
Response.Write "<hr>" Response.Write "<h4>HTML Code for "&URL&"</h4>" Response.Write "<textarea rows=30 cols=120>" Response.Write objXMLHTTP.responseText 'output the html that was pulled from the page Response.Write "</textarea>" Set objXMLHTTP = Nothing
----------------------------------------------- and it works...it fetches the page but i want it to save the information that it fetches into an html file
set strm1=createobject("adodb.stream") With strm1 .type = 1 .open .write objXMLHTTP.responsebody .savetofile sFile, 2' adSaveCreateOverWrite .close End With ------------------------- but it doesnt want to write to file.
i get the following error ADODB.Stream error '800a0bbc'
Write to file failed.
/bytesect/data/test2.asp, line 15
Can anyone please help i am really struggling with this...I simply want a generated ASP page to be saved into an html page on the server through a script. I tried the filesystemobject method but it would be insane to insert an FSo.writeline "" code into every single line of html. This XMLHTTP component is promising but i wanna save the file!
I am creating ASP pages which call for information from a database, however when I have completed the page in FP, exit, and go to Access to modify a Query, I am told the Database is still in use and that only "Shared access " is available.This does not happen if I reboot the computer.The page was generated by Access "HTML Wizard.I am using FP98 and W98.
How can you insert a quote ' or " into a database from a forum without getting an sql error due to the quotes closing, or opening a new field in the sql string.
I have a Parks Database where anyone can see a complete list of parks we have. What I would like is for people to be able to sort this list by certain parameters, one of them being a "District" parameter, but could conceivably be parameters such as Sort By "Playground" to see a list of Parks with Playgrounds.
Is there a way for me to do this via some sort of hyperlink to the "District", that if it's clicked on, does a new form (Maybe a form named sortViaDistrict) within the same page? I'm not too sure how to do something like this. Code:
I've got a little user poll system and I'm trying to create an 'edit' form. The form relates to 2 database tables, one holds the poll details (title, start date, end date, etc) and the other holds the answers/options (answer_id, answer, etc). I've successfully setup the form so it updates the poll details but I can't work out how to update the answers? Code:
my script is working properly but i want to create another sheet of the Excel file because i will export multiple tables from the dtabase to an Excel file with multiple sheets. it only creates one sheet?
The scenario is that the user enters a description of a special offer into a text box and then can add that record to a database field using the insert method of asp. However, an error occurs if the description has any apostrophes in. For example,
special offer 1: andy's prize plums could cause an error because the insert looks something like this
"insert into offersTable(offerDescription) values (' " & request.form("description") & "'"
is there some way to escape all naughty characters so they don't cause a problem. Any suggestions very welcome.
I have a dbase containing login details for 21,000 members. I also have a forum that I am about to implement.
When the user gets to the main site, he has to login (this is done by checking his credentials against DB1) When he is logged in, all his details are stored in session variables. Clicking on the forum link will take him to the forum where he has to log-in or register. Currently, the forum checks cookies to see if there is a valid name and password and then checks these against it's own DB (herein called DB2) or requires the user to login/register
I plan to modify the forum so that the login is bypassed and the forum accepts the current session name and password as the login. (This is so that all names on the site main site, chat, forum etc are uniform, i.e Dave47 in a chat room, is Dave47 in the forum, is Dave47 in the members area etc)
so...what I need to do (if you're still with me) is.
When a new user registers on the main site, his details are put into DB1 *and* DB2. , can I have two data sources open at once?
The reason I need two DBs is that the information in DB1 is a lot less than is needed by the forum in DB2.
Also how can I copy selected fields from DB1 (name, password for existing users) into DB2? like I said..there's 21,000 and to do it manually would take forever.
I am currently working on a small asp application. Now I would like to store the complete database connection in the application object. Note I want to store the connection NOT the connectionstring. For that purpose I wrote a small asp include which connects to the dbase and stores the connection object to the application object. However when I use this include in my pages then it doesnt work. What I am doing wrong? Here is the code:
I've been tasked with integrating an older management system based on DBF files with my snappy new ASP application to provide users of the ASP application with real-time data from the management system.
I figure with DBF files, I should use either the DBase drivers or the FoxPro drivers to connect to the database. Code: