Passing Recordset To Sub
I am new to asp and need some help with passing a recordset from one Sub to another.
View RepliesI am new to asp and need some help with passing a recordset from one Sub to another.
View RepliesI've been trying to figure this out for a couple of days to no avail. I'm trying to pass a value that I get from one database query (stored in the recordset. To another database query, and I'm getting an error stating that there is a type mismatch. Here is the code.
Specifically I'm trying to pass the value of ThreadID that I get from the first query (always returns a single value) storing it in a variabel called ThreadReply, and then using that variable in my second query statement.
set rs = Server.CreateObject("ADODB.recordset")
sql="SELECT ThreadID FROM TblForumThread WHERE ThreadName='"&Session("ThreadName")&"';"
rs.Open sql, conn
ThreadReply=rs("ThreadID")
rs.Close
set rs = Server.CreateObject("ADODB.recordset")
sql="SELECT * FROM TblForumReply WHERE ThreadID='"&ThreadReply&"';"
rs.Open sql, conn
I'm using a "classic" asp-page and a .net-component which I want to call
passing a Recordset as a parameter. I have a reference to ADODB in the .net
component which should supply a COM rapper for a Recordset. In the .net
component code looks like: Code:
I keep getting the BOF and EOF error message. My code is testing for entries within the database only from the current. If an entry of the current day doesnt exsist VBScript will spit the EOF /BOF error. I can i get pass this and still display my form as I want to. Here is my code:
View Replies View RelatedI am looking for a way to pass an ADO recordset that has been retrieved in
an ASP page to another HTML-page. Is there someone who can provide me with a
small sample or a link to see how this is done?
Last week, my shopping cart was still working well until I began getting the following errors 2days ago..
Error Type:
ADODB.Recordset (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
../order/saveorder.asp, line 157
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Page:
GET /main/saveorder.asp
Could you check my code below and let me know what possibly the error is?
I have created a forum, in which I have 3 tables:
1: Table_Forum
2: Threads
3: Replies
I have it at the moment that on the main default.asp there is a recordset that will
display all records within that table, these are a list of forums that will be available.
I have a table that will show the forum name, and the description. This table is then looped using Do while not, now what i need to do is show how many records in the Treads table are related to each forum using asp. Code:
I need to click on a button and pass through a variable with a number
associated to it to other form
That is. I know I can do something like this:
<FORM action="http://somesite.com/prog/adduser" method="post">
<INPUT type="submit" value="Send"> <INPUT type="reset">
</FORM>but.. can I do something like this?<FORM
action=http://somesite.com/prog/adduser?data=14 method="post">
<INPUT type="submit" value="Send"> <INPUT type="reset">
</FORM>
How do I do it?
I have some code which I use server.Execute. In the included code for
the server.execute, if I use a Request variable I get an error stating
that I cannot use request after UPL but If I change all the variable
names from request
to upl, it tells me that UPL is not defined.
It seems that the page is passing the form values for request but not
UPL
I have got a news section which i am working on i can get all the news items to display the short description and title with the link to the full item but when i click on any of them it takes me to the very first record in the database. i have been told that the problem is with the ids not being passed through properly but im not sure.
View Replies View RelatedI have a small problem.How can I pass value from form thru a few pages. I try with hidden field but my second page just validate and redirect to other one and when I use Request.Form("field") it's nothing coming back.
View Replies View RelatedI am creating a simple news WAP site which uses a database. The database consists of three columns, storyid, storyheadline and story. The first page outputs the storyheadlines. When the user clicks on the headlines, they are taken to another page. The storyid is passed through the url (stored as storyno) and the next page loads the story which matches the headline. So basically, I need to know how to correct this:
SQL = "SELECT * FROM gmscwapstories WHERE storyid = <% Request.QueryString("storyno") %>"
This doesnt seem to be working.
how to properly parse this so "Cute & Cuddly" passes to the calling page. I need to pass the & sign.
<option value="search.asp?category=Cute & Cuddly&subcategory=brown">
I have a members only section of my site, which is protected and works fine, but i want to be able to alow the user to update their profile. Problem is, i don't have anything to pass in the url.
In the member record update section of the admin, i have the url, as it leads on from the chosen members id....eg...www.xxxx.com?id=2.......like that. But where the user updates their profile, it has nothing to send data from...eg...a form/recordset. Could this be done by storing it in a cookie or something?
I'm trying to display data from three tables. The main table has a Record number and the other table contain the same number. I need to pass the parameter value (record number) from the main table to the other tables (table2 and table3) and display there data on the same web page.
i can get the three recordsets open, but I can't select table2 and table3 by the record number from the main table. I also need to be able to move through the recordset one record at a time backward and forward.
I am trying to pass a value in a way that after a user has successfully logged in to an ASP app through a form, their login id would be passed to a welcome page.
for e.g. after their login they get to a page saying "Welcome User what would you like to do? " This is probably simple but I am new to ASP,so how can this be done ?
Is there a code, or something that scrambles the value being passed fromone asp page to another??
what I mean is this:
if i want to pass a value from a database (record id #721) from my page records.asp to recordview.asp
it might appear like this in the browser window, or when u highlight the link on records.asp:
recordsview.asp?K=751
I don't want users to see exactly what record number is being access... so I'd like it to show some garbage in the browser like
recordsview.asp?@$@#$=DSFSD+jklsjkld
you get my drift...
This is hopefully a really simple issue... but what is the best way to pass a variable from one .asp page to the next?
View Replies View RelatedI'm trying to post variables using http to a site with a different domain and need my page to wait until it gets a returned value back and then insert that value returned into a database. Once I'm able to get the variable back i know how to get it into a database, just don't know how to have the page wait for the value returned.
View Replies View RelatedI have a submit form that collects my values, and if my form action is "mailto" the values are passed, but if I try to pass to another asp page the values aren't sent and the asp doesn't execute.
View Replies View RelatedI am trying to write a search application which will allow a database holding a text to be searched.
To search the text the user has to select the act, the scene, the character
Right this is where it gets tricky!
The acts all have different scenes and the scenes all have different characters - so rather than try and attempt a very complicated linked combo box for the act, scene and character I figured a more sensible way of doing it would be to have the user enter the act they want to search on one page. The value of this would then be passed by form to the next page (to get the scene).
Based on the act selected a dropdown box is then populated with all the scenes for that particular act. Following on from this I then want to pass the scene selected together with the act selected on the previous page to the next page which will get the character. I can get the scene value passed through to the character page but not the act value as this is now a server side variable. Basically what I want to end up with is after the user has selected the character on the third page, I want to be able to use all this information to build an SQL search statement.
In case you are wondering why I decided to do it in this way, I initially tried the linked combo box method but found that if the user doesn't click the boxes in the correct order it causes problems with updating the box contents. Doing it this way I figured I can force the user to enter the information in the correct order. Code:
I am trying to make a variable appear in an SQl but am not sure how. Here is the sample code:
View Replies View RelatedI have a form and from there I click on link to open a search page, choose an item(checkbox), then that item should appear in the same form I first opened. I tried javascript onClick event such as :
<input type=submit name=submit value=Submit onclick="javascript: form1.submit();">
and also tried:
<input type=submit name=submit value=submit onclick='http://myformurl/form.asp'>
It is only opening a new form instead of the same one. How can I do to choose to pass the value to the same form?
i m using frontpage to create a login form using SQL SERver database. i want 2 redirect the value of username & password to another page.
View Replies View RelatedIs there a way I can pass a javascript variable's value and use it in my asp code?
This is what I am doing:
I have a checkbox.
onclick="SelectView('course')"
javascript:
Function SelectView(course){
var course
course = 'course'
}
then in ASP (again)
if (javascript variable course = course) then
do something
end if
I've got a form that has ENCTYPE="multipart/form-data" - this works great for getting a file from the user, however, no matter what I've tried, I can't seem to get any of my other fields passed to the next page. Here is an example:
<input type="text" name="lname" value ="<%= request.form("lname") %>"> I need the "name" field to be passed to the next page.
This if my form tag:
<FORM NAME="UploadFile" METHOD="POST" ACTION="UploadFileAck.asp" ENCTYPE="multipart/form-data">
I've tried an onblur when a name is entered, but it still doesn't recognize the lname field. Any ideas would be appreciated!!
I hope I can explain this without much confusion.I have a search box on a site that contains 2 forms. One form is a search for Cities (via dropdown box) that goes to citylistings.asp. The other form is a search for Counties (via dropdown box) that goes to listings.asp.
Now I need to add the ability for the user put a Minimum and Maximum price in addition to the above. My problem is that I am unsure how to have just one set of price boxes for both forms. So that you can fill in the prices, and click Submit for either form, and the prices get passed.
You can view the page Here.
A guy who used to code in VB said that I should be able to declare variable, then when the user clicks on the box and types a value, the variable is set to that value. Then I can added hidden fields to the forms that are equal to the variables. Can I do this using ASP/VBScript.Or can I accomplish something similar?
I'm posting a form from a php page to a page that's asp. I want the url parameters sent to the asp page to be the defaults of the form. I've never used asp so I'm not sure how to do this.For example:
www.test.com/test.asp?clientid=123
Text field in asp/javascript form called "client" should now default to "123".
In php I would have put this as the default value for the "client" field in the form: <?php $_GET['clientid']; ?>
What would be the equivalent way of doing it for asp?
I have a function set up to send out an email. The function recieves parameters(email, subject, body). For some reason the function will only work if I change the function to accept only one parameter. ie. function imail(email).
View Replies View RelatedHow do I pass the value from form to SQL insert statement?
Code:
Insert into table values ('A','" &request.form("Textbox1") &"')"
Is the request.form statement correct?It seems that the record is enter to DB but second field is empty.
Current situation: I have an unordered html list with list items calling an asp (with an url parameter), look at the code below
Desired situation: I have an unordered html list with list items calling an asp (without url parameter, instead passing parameter in a different way, maybe via the session variable).how to pass selected list item value/index to an asp (without url parameters)?
Code:
<% LocalArray = Session("JaarArr") %>
<ul class="secondair-menu" id="YearList">
<% For i = 0 to cInt(Session("Aantaljaar"))-1 %>
<li><a href="cumulatief.asp?jaar=<%=localArray(i)%>"><script
language=Javascript>formatjaar(<%=localArray(i)%>)</script></a></li>
<% Next %>
</ul>
I am developing a website for our agency. My plan is to make a master-detail Page. In the Master page it will consist of 2 fields. 1. Project Status 2. Type of Project. and also it has a submit button. Once the submit button is click it will query my database based on the content of the two fields and it will be displayed in the detail page.
I am using Dreamweaver. I have tried their master detail page but it only can filter 1 field. also I have successfully connected to my database. Any suggestion on how will I ba able to accomplish my problem?
I have a request from a fellow conrtractor (differnt company) to have a form pass the users IP and machine name upon submission. I know that request.serverVariables("remote_addr") and request.serverVariables("remote_host") will yield the users IP but do not know of anything that will pony up the machine name.
I contend that under normal circumstances a browser doesn't have access to the machine name for user security reasons but my friend doesn't agree and insists it is "somewhere in the envirnment information." He may know something I don't but he doesn't know enough to show me how to extract what he wants in the form.
Further information: we are working on a Microsoft Active Directory network. This may provide some mechanism to pass that information.