473,698 Members | 2,376 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Listing Numbers

Oli
Hi

I have 2 textboxes - "from" & "to".

Assume I enter number 1 in "from" and 10 in "to" - I want the ASP to return:
1,2,3,4,5,6,7,8 ,9,10 and insert this into an Access database over 10 rows
into the 'number' field.

Anyone got any ideas how to do this?

TIA
Oli
Jul 19 '05 #1
3 1453
Please don't multi-post. I answered this in another group...

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Oli" <ol*@NOSPAMoliw oods.co.uk> wrote in message
news:bq******** **@titan.btinte rnet.com...
Hi

I have 2 textboxes - "from" & "to".

Assume I enter number 1 in "from" and 10 in "to" - I want the ASP to return: 1,2,3,4,5,6,7,8 ,9,10 and insert this into an Access database over 10 rows
into the 'number' field.

Anyone got any ideas how to do this?

TIA
Oli

Jul 19 '05 #2
Hi,

You can do this:-

<%
Dim to, from, i

to = Request.Form("t o")
from = Request.Form("f rom")

For i = cInt(to) to cInt(from)
sql = "insert into table_name (field_name) values ("&i&")"
objConn.Execute (sql)
Next

%>

Hope this helps,

Regards,
Bhaskardeep Khaund
Jul 19 '05 #3
Bhaskardeep Khaund wrote on 30 nov 2003 in
microsoft.publi c.inetserver.as p.general:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.3790.94" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff >


Bhaskardeep, please no html on usenet !

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
2461
by: Chris | last post by:
Hi, Not sure if this is the right forum, but hopefully someone can help me. I am creating something for our intranet and i want to list the files and folders of a directory, i found some code to do this. The only problem is that it lists the asp file used to for example if i go to: "http://myserver/listing.asp" In the file listing will be "listing.asp" amongst a lot of marketing documents.
1
6300
by: httpmart | last post by:
On my website I routinely make use of anchors such as: <a name="shipping">SHIPPING</a> and a link to them such as: <a href="#shipping">Go to Shipping information</a> These work fine on IE.
19
3304
by: SU News Server | last post by:
I've struggled with this for quite a while and I'm am just not sure what is going on. I have the following code import os def buildList( directory='/Users/mkonrad' ) dirs = listing = os.listdir(directory)
3
2042
by: David Jacques | last post by:
I am trying to get a list of all files of a certain extension type on disk to do some processing in a loop. The code needs to be portable to UNIX, so I need to use plain c functionality. Does anyone know of a way to do this ? Any URLs, code snippets, etc ?
3
1591
by: KK | last post by:
Hello all, I have several classes binded by one common interface - say 'sum' interface which calculates the sum of all the class elements of type 'int'. class Alphabet { int _a; int _b; int _c;
12
3203
by: soccertl | last post by:
Is there a listing of what the compile errors mean? For example: "hdb_log.c", line 163.22: 1506-046 (S) Syntax error. "hdb_log.c", line 160.20: 1506-098 (E) Missing argument(s). make: 1254-004 The error code from the last command is 1. How do I find out what 1506-046 and 1506-098 mean? Thanks for any help.
1
5320
by: vhg119 | last post by:
Can someone please link me to some resource listing all the user attributes names? I'm writing some C# code using the System.DirectoryServices assembly. This particular function is suppose to search for a user by "displayName" and set the users phone numbers. I have an incomplete list of Properties: displayName, givenName, sAMAccountName... I need the property names for: "Telephone number" in the General tab of Active Directory Users...
1
1495
by: Johnny Jörgensen | last post by:
I've got a serious problem. I've got Visual Studio 2005 installed, and of course I'm using the Pretty Listing formatting function. When I start up VS, everything is fine, but after a while (which can be one minute or one hour) the Pretty Listing starts acting weird. For instance, if I start writing "for...", it changes it to f(o) r" or something like that. When that starts happening, I can't code at all and have to restart VS. Sometimes...
1
1849
by: awaisworld13 | last post by:
hello every one: i want to write a program in which a set is entered.two numbers of the set is also entered.it will print all the combinations and permutations on the out put screen. E-G if i have a set {1,2,3,4,5} if i select permutation for two numbers than it will print e-g 1 2 2 1 1 3 3 1
5
3483
by: jain236 | last post by:
HI every body, i am always getting the following error while parsing a directory . i am reading a directory by doing ls and trying to find out the name,type,size, mtime and mode of files from the directory my @valeu =@{$Files}; foreach my $file (parse_dir(\@valeu)) { @Files = $ftp->ls('-lR');
0
8676
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8608
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9029
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8897
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7732
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2332
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2006
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.