Importing RecordSet to .asp file

This is a discussion on "Importing RecordSet to .asp file" within the Classic ASP section. This forum, and the thread "Importing RecordSet to .asp file are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Nov 14th, 2005, 04:36
Junior Member
Join Date: Nov 2005
Age: 55
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Importing RecordSet to .asp file

Hello !

I need a bit of big help please

I have the site http://www.easytraveller.gr where i have .asp files like http://www.easytraveller.gr/acropole_delphi.asp .
In the asp file I import dynamically the dates, nights and number of persons from an access db.
I have created a recordset that brings back the contents of the table that shows the room types the periods and the rates, but I do not know how to import this recordset dynamical in the file. If I create a list/menu box that shows only one line. Where and how I can import this recordset or is there another way?

Regards
Tolis
Reply With Quote

  #2 (permalink)  
Old Nov 14th, 2005, 11:59
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Importing RecordSet to .asp file

Code: Select all
<%
Do While Not objRS.EOF
  Response.Write("<option value="""&objRS("value")&""">"&objRS("name")&"</option>")
objRS.MoveNext
Loop
%>
Reply With Quote
  #3 (permalink)  
Old Nov 14th, 2005, 19:53
Junior Member
Join Date: Nov 2005
Age: 55
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Importing RecordSet to .asp file

Sorry Sam
I am a little confused
the recordset with the information is rsHerodionRates

Where in the code

PHP: Select all

<%
Do While 
Not objRS.EOF
Response
.Write("<option value="""&objRS("value")&""">"&objRS("name")&"</option>")
objRS.MoveNext
Loop
%> 
I will put the rsHerodionRates ?

Regards
Tolis

Last edited by Rob; Nov 19th, 2005 at 13:20. Reason: PLEASE USE CODE TAGS!!!! [code]your code here[/code]
Reply With Quote
  #4 (permalink)  
Old Nov 17th, 2005, 20:02
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbramz
Re: Importing RecordSet to .asp file

Code: Select all
<%
Do While Not rsHerodionRates.EOF
Response.Write("<option value="""&rsHerodionRates("value")&""">"&rsHerodionRates("name")&"</option>")
rsHerodionRates.MoveNext
Loop
%>
Reply With Quote
  #5 (permalink)  
Old Nov 18th, 2005, 12:24
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Importing RecordSet to .asp file

keep earning them brownie points ben!
Reply With Quote
  #6 (permalink)  
Old Nov 18th, 2005, 18:44
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbramz
Re: Importing RecordSet to .asp file

did i earn one just then? lol
Reply With Quote
  #7 (permalink)  
Old Nov 19th, 2005, 13:22
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
Re: Importing RecordSet to .asp file

NO!!! hahaha...

But to get back on topic.... Tolis, I think you'll find Benbramz code will suffice!

PS... rememeber to use code tags.. eg. [code]your code here[/code]
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
Reply With Quote
  #8 (permalink)  
Old Nov 23rd, 2005, 20:20
Junior Member
Join Date: Nov 2005
Age: 55
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Importing RecordSet to .asp file

Hello everybody

Your help is very usefull
Must be my mistake becasue I did not say that the ercordset to be inserted was a whole table. So following your instructions was getting Microsoft Jet database error
I finaly found the solution. Using the Dreamweaver went
Insert>Application Objects>Dynamic Data>Dynamic Table and here I gave the Recordset. Now is working perfet and you can check it at
http://easytraveller.gr/herodion_athens.asp
Thank you again
Tolis
Reply With Quote
  #9 (permalink)  
Old Nov 23rd, 2005, 20:23
Junior Member
Join Date: Nov 2005
Age: 55
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Importing RecordSet to .asp file

I forgot to put the code

<%
Dim rsHerodionRates
Dim rsHerodionRates_numRows
Set rsHerodionRates = Server.CreateObject("ADODB.Recordset")
rsHerodionRates.ActiveConnection = MM_Connection1_STRING
rsHerodionRates.Source = "SELECT Room, PERIOD1, PERIOD2, PERIOD3, PERIOD4 FROM herodion"
rsHerodionRates.CursorType = 0
rsHerodionRates.CursorLocation = 2
rsHerodionRates.LockType = 1
rsHerodionRates.Open()
rsHerodionRates_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
rsHerodionRates_numRows = rsHerodionRates_numRows + Repeat1__numRows
%>

Bye
Tolis
Reply With Quote
Reply

Tags
importing, recordset, asp, file

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
recordset/table display Eclipse414 Web Page Design 4 Dec 25th, 2005 21:02
ADODB.Recordset error '800a0bb9' grittyminder Databases 2 Jul 15th, 2005 21:09
importing txt file to SQL with recordset EnvY Classic ASP 21 Mar 28th, 2005 11:22
passing recordset to next page? Monie Classic ASP 1 Sep 25th, 2004 07:53
recordset constants (data types) spinal007 Classic ASP 6 Sep 19th, 2004 07:39


All times are GMT. The time now is 20:57.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43