|
 |
asp_databases thread: SV: Re: asp_databases digest: March 29, 2002
Message #1 by =?us-ascii?Q?Hakan_Frennesson?= <hakan@c...> on Sat, 30 Mar 2002 17:57:49 +0100
|
|
Hi!
Why don?t you just load the page in IE and save the page from there.
Hakan
-----Ursprungligt meddelande-----
Fran: Niraj Sharma [mailto:nsharma@y...]
Skickat: den 30 mars 2002 17:10
Till: ASP Databases
Amne: [asp_databases] Re: asp_databases digest: March 29, 2002
I am trying to do something similar:
I have an .asp page which retrieves a long list of
items on my website. I want to creat a static .htm
version of the dynamic data for this page.
How can I do this?
--- ASP Databases digest <asp_databases@p...>
wrote:
> -----------------------------------------------
> When replying to the digest, please quote only
> relevant material, and edit the subject line to
> reflect the message you are replying to.
> -----------------------------------------------
>
> The URL for this list is:
> http://p2p.wrox.com/list.asp?list=3Dasp_databases
>
> Get the Readers Advantage price for
> Professional ASP Data Access from Barnes & Noble.
> ---
>
>
http://service.bfast.com/bfast/click?bfmid=3D2181&sourceid=3D38934667&bfp
id=3D1861003927&bfmtype=3Dbook
>
> ASP_DATABASES Digest for Friday, March 29, 2002.
>
> 1. Updating records
> 2. problem in inserting dato in MS Acess
> 3. RE: problem in inserting dato in MS Acess
> 4. RE: Updating records
> 5. RE: Updating records
> 6. Re: Creating an ODBC link to access db on the web
> 7. RE: problem with insert data into database
>
>
----------------------------------------------------------------------
>
> Subject: Updating records
> From: fred.sonderman@o...
> Date: Fri, 29 Mar 2002 09:13:38
> X-Message-Number: 1
>
>
> Hi all,
>
> I am having problems getting the following script to
> save for me. I hope
> somebody will notice something out of place.
>
> Thanks in advance,
> Bill
>
> <%@ LANGUAGE=3D"VBSCRIPT" %>
> <%
> 'Set how many records per page we want
> InitialNumPerPage =3D 1
>
> 'Retrieve what page we're currently on
> if request.form ("NumPerPageText")=3D "" AND
> request.querystring
> ("NumPerPage") =3D "" Then
> NumPerPage =3D InitialNumPerPage
> else
> if request.form ("NumPerPageText") =3D "" Then
> NumPerPage =3D request.querystring("NumPerPage")
> Else
> NumPerPage =3D request.form ("NumPerPageText")
> End If
> End If
> =09
> Dim CurPage
> if request.querystring("CurPage") =3D "" Then
> CurPage =3D 1
> else
> CurPage =3D request.querystring("CurPage")
> end if
>
> '--Declare variable
>
> Dim Dataconnection, cmdDC, RecordSet
> Dim RecordToEdit, Updated
>
> Set dataconnection =3D
> Server.CreateObject("ADODB.Connection")
> dataconnection.Open "Provider=3DSQLOLEDB; DATA
> Source=3Ddefault; initial
> catalog=3Dpubs; user ID=3Dsa; Password=3D;"
>
> set cmdDC =3D Server.CreateObject("ADODB.Command")
> cmdDC.ActiveConnection =3D DataConnection
>
> 'Open our recordset
> Dim SQL
> SQL =3D "SELECT * FROM stores"
>
> cmdDC.CommandText =3D SQL
> 'Explicitly Create a recordset object
> Dim rs
> Set RecordSet =3D
> Server.CreateObject("ADODB.Recordset")
>
> '*************************Paging system
> *******************************
> 'Set cursor location property
> RecordSet.cursortype =3D3
> RecordSet.cursorlocation =3D3
> set RecordSet.ActiveConnection =3D Dataconnection
> 'Set the cache size =3D to the # of records/page
> RecordSet.cacheSize =3D NumPerPage
> '*************************End Paging system
> *******************************
>
> RecordSet.Open cmdDC, , 0, 3
>
> RecordSet.MoveFirst
> RecordSet.PageSize =3D NumPerPage
>
> 'Get the max number of pages
> Dim TotalPages
> TotalPages =3D RecordSet.PageCount
>
> 'Set the absolute page
> RecordSet.AbsolutePage =3D CurPage
>
> 'Counting variable for our recordset
> Dim count,strSearch
>
>
> '******** End Paging System
>
> '************* Updating Record ***************
> if Request.form("btnUpdate") =3D "SAVE" Then
>
> 'gather form field values
> stor_name =3D request.form("stor_name")
> city =3D request.form("city")
>
>
>
> 'define the update query
> strUpdate =3D "UPDATE stores set
> stor_name=3D'"&stor_name&"',
> city=3D'"&city&"' WHERE stor_id=3D"&id&""
>
> 'execute the update
> cmdDC.Execute(strUpdate)
>
> updated =3D "True"
> End if
> '**********************************************
>
> %>
>
> <HTML>
> <head>
> <title>Stores information</title>
> <script language=3D"javascript">
> <!--
> //
> function confirmsave()
> {
> var agree=3Dconfirm("Are you sure you want to make
> changes to this
> record?");
> if (agree)
> return true;
> else
> return false;
> }
> // -->
> </script>
> </head>
> <BODY>
> <form name=3D"storeForm" action=3D"default.asp"
> method=3D"post">
> <table>
> <tr>
> <td>
> <%
> ''First/Last butons
> Response.write("<input type=3Dbutton value=3DFIRST
>
onclick=3D""document.location.href=3D'default.asp?Curpage=3D1&NumPerPage=3D
")
> response.write( NumPerPage & "';"">")
> %>
> </td>
> <td>
> <%
> ''Prev buton
> If CurPage > 1 then
> Response.write("<input type=3Dbutton value=3DPREV
>
onclick=3D""document.location.href=3D'default.asp?Curpage=3D")
> response.write( curpage -1 & "&NumPerPage=3D" &
> NumPerPage & "';"">")
> End if
> %>
> </td>
> <td>
> <%
> ''NEXT buton
> If CInt(curpage) <> Cint(totalpages) then
> Response.write("<input type=3Dbutton value=3DNEXT
>
onclick=3D""document.location.href=3D'default.asp?Curpage=3D")
> response.write( curpage + 1 & "&NumPerPage=3D" &
> NumPerPage & "';"">")
> End if
> %>
>
> </td>
> <td>
> <%
> ''LAST buton
>
=3D=3D=3D message truncated =3D=3D=3D
__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - send holiday greetings for Easter, Passover
http://greetings.yahoo.com/
|
|
 |