Wrox Programmer Forums
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 2nd, 2005, 01:41 AM
Friend of Wrox
 
Join Date: May 2005
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default rs.source problem

i have two pages the first page is a form with 25 variables that sent to next page.first page is shown but it takes much time to complete(the page shown compoletely but the explorer bar on the top of the right side of page is moving about 15 minuts or more) i don't wait the page to be complete loaded and select my variables and send them to next page but at the next page therre is no value of recorset shown
please tell me where is the problem
thank you






 
Old July 2nd, 2005, 04:23 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I am not sure I understand what the problem is. Why would a page take 15 minutes to load? Do you get the data from a slow location?

Can you post (a stripped down version of) your code to this list so we can take a look??

Imar

---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old July 2nd, 2005, 07:45 AM
Friend of Wrox
 
Join Date: May 2005
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

thank you for your reply.i get datam from my own computer(i mean my sql database).i've wrote about 45 pages with this compter and same data base.but i didn't have any problem.i think it doesn't send any variable to the next page.
this is my form code(i have more varibales in it):
<td align="center" valign="top"><form action="HGinfview.asp" method="post" name="form1" id="form1">
        <table border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#D1ECFC">
          <tr><td width="624">
        <table width="624" border="0" align="center" bordercolor="#CCE8F9">
          <tr>
            <td width="120" align="left" nowrap bgcolor="#000033"><span class="style6 style2"><em>Site / Workshop </em></span></td>
            <td width="494" align="left"><select name="SiteWorkshop">
              <option value="null">All</option>
              <option value="site">Site</option>
              <option value="workshop">workshop</option>
            </select></td>
          </tr>
          <tr>
            <td align="left" valign="baseline" nowrap bgcolor="#000033"><span class="style6 style2"><em><strong>Unit No:</strong></em></span></td>
            <td align="left"><select name="UnitNo">
              <option value="null">All</option>
              <option value="1">1</option>
              <option value="2">2</option>
              <option value="3">3</option>
              <option value="4">4</option>
              <option value="5">5</option>
        </select></td>
</tr>
<tr><td>&nbsp;</td>
<td><input type="checkbox" name="HGResponsible" value="1">
                    <em><strong>HG Responsible<br>
                    <input type="checkbox" name="Supplier" value="1">
                Supplier<br>
                <input type="checkbox" name="ScopeOfWork" value="1">
                ScopeOfWork
</form></td></tr>
thank you for you attention

 
Old July 2nd, 2005, 11:01 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Other than some very incorrectly nested tags, I don't see much problems with this page.

Try this:

1. Make sure the page posts to itself. Set the action of the form to the page name

2. Add a submit button

3. Add the following code at the top:

<%
    For Each item In Request.Form
        Response.Write("Key " & item & " has a value of " & Request.Form(item) & "<br />")
    Next
%>

Run the page and click the submit button. I am sure you see form values being posted. So, the problem must be in another page or another code section.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old July 2nd, 2005, 11:05 PM
Friend of Wrox
 
Join Date: May 2005
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

my page has a button that send these values to next page , but i didn't put its code here.it is a submit button and its value is select.thnak you for your attention.i have a question:i should put this tag top of the page that has form in it or the next page that we post data to it???
thank you

 
Old July 3rd, 2005, 03:41 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

The button should be on the initial page, inside the <form> tags. E.g.:

<input type="submit" name="btnSubmit" value="Click Me" />

With this button, the form will be submitted to the page specified in the action attribute of the form tag, HGinfview.asp in your case.

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old July 3rd, 2005, 03:50 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

While reading this message again, I realized your question probably wasn't about the button, but about the asp code, right?

In that case, yes, that code should go at the top of the page you post to, HGinfview.asp. It displays all the information posted to it from the previous page.

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old July 3rd, 2005, 07:58 AM
Friend of Wrox
 
Join Date: May 2005
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

thank you for your guidance.i add that code to my first page(form page).and checked the button.it sends parameters to next page.because my table titles in next page are accroding to these parameters but yet it doesn't show any value of records.can it be beause of my filters that i put for recordset?
would you please take a look at my recordset code please?
<%
Dim rs
Dim rs_numRows

Set rs = Server.CreateObject("ADODB.Recordset")
rs.ActiveConnection = MM_QCcon_STRING
if (rs__MMColParam<>"null") and (rs__MMColParam1<>"null") and (rs__MMColParam2<>"") then
rs.Source = "SELECT * FROM dbo.tbHGInf WHERE SiteWorkshop = '" + Replace(rs_MMColParam, "'", "''") + "' AND UnitNo = '" + Replace(rs_MMColParam1, "'", "''") + "' AND HGNo = '" + Replace(rs_MMColParam2, "'", "''") + "' "
end if
if (rs__MMColParam="null") and (rs__MMColParam1<>"null") and (rs__MMColParam2<>"") then
rs.Source = "SELECT * FROM dbo.tbHGInf WHERE UnitNo = '" + Replace(rs_MMColParam1, "'", "''") + "' AND HGNo = '" + Replace(rs_MMColParam2, "'", "''") + "' "
end if

if (rs__MMColParam<>"null") and (rs__MMColParam1="null") and (rs__MMColParam2<>"") then
rs.Source = "SELECT * FROM dbo.tbHGInf WHERE SiteWorkshop = '" + Replace(rs_MMColParam, "'", "''") + "' AND HGNo = '" + Replace(rs_MMColParam2, "'", "''") + "' "
end if

if (rs__MMColParam<>"null") and (rs__MMColParam1<>"null") and (rs__MMColParam2="") then
rs.Source = "SELECT * FROM dbo.tbHGInf WHERE SiteWorkshop = '" + Replace(rs_MMColParam, "'", "''") + "' AND UnitNo = '" + Replace(rs_MMColParam1, "'", "''") + "' "
end if
if (rs__MMColParam="null") and (rs__MMColParam1="null") and (rs__MMColParam2<>"") then
rs.Source = "SELECT * FROM dbo.tbHGInf WHERE HGNo = '" + Replace(rs_MMColParam2, "'", "''") + "'"
end if
if (rs__MMColParam="null") and (rs__MMColParam1<>"null") and (rs__MMColParam2="") then
rs.Source = "SELECT * FROM dbo.tbHGInf WHERE UnitNo = '" + Replace(rs_MMColParam1, "'", "''") + "' "
end if

if (rs__MMColParam<>"null") and (rs__MMColParam1="null") and (rs__MMColParam2="") then
rs.Source = "SELECT * FROM dbo.tbHGInf WHERE SiteWorkshop = '" + Replace(rs_MMColParam, "'", "''") + "' "
end if



rs.CursorType = 0
rs.CursorLocation = 2
rs.LockType = 1
rs.Open()

rs_numRows = 0
%>
thank you again for your help and soory if i make you tired

 
Old July 4th, 2005, 01:19 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You should have added the code to the *second* page, as that is the page you're posting to.

To debug this problem, try this:

1. Modify the code, so it reads like this:

rs.CursorType = 0
rs.CursorLocation = 2
rs.LockType = 1
Response.Write("Sql is " & rs.Source)
Response.End
rs.Open()

This results in something like: "Sql is SELECT bla bla bla"

2. Copy that output (without the "Sql is" of course) and paste it into the query designer of your database.

Do you get any results? If not, analyze your query and see why you're not getting the records. Once the query works in the database, modify your ASP code with the new query.

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: You Said Something by P.J. Harvey (Track 8 from the album: Stories From The City, Stories From The Sea) What's This?
 
Old July 4th, 2005, 10:47 PM
Friend of Wrox
 
Join Date: May 2005
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

problem has solved.thank you for your guidance.






Similar Threads
Thread Thread Starter Forum Replies Last Post
problem installing RS eval edition geoffc BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 November 8th, 2006 06:52 PM
rs.movenext problem hastikeyvan Dreamweaver (all versions) 1 October 27th, 2005 10:13 AM
rs.source problem hastikeyvan Classic ASP Professional 0 July 2nd, 2005 01:35 AM
rs.source problem hastikeyvan Classic ASP Basics 0 June 28th, 2005 11:49 PM
RS Manager and RS Server on 2 different computers Choose File BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 1 July 22nd, 2004 10:56 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.