Hi everyone, here's what id like to do.
I have a table with 2 fields, name and value
I need to be able to add multiple records quickly, for example I need to add
name value
abc 1
abc 2
abc 3
abc 4
abc 5
abc 6
etc etc, does each record have to be added separately, or is there a way I
can add a chosen number of records, lets say 10, and have the value field
increase by one each time?
sometimes I might have 30+ simple records that need adding quickly, and each
time the first records value will be one, and each record after will
increase by one, is there a way to solve this problem or does each record
have to be added separately?
Thanks
Jamie 6 2410
Jamie Fryatt wrote on 06 feb 2004 in
microsoft.publi c.inetserver.as p.general: Hi everyone, here's what id like to do.
I have a table with 2 fields, name and value
I need to be able to add multiple records quickly, for example I need to add
name value abc 1 abc 2 abc 3 abc 4 abc 5 abc 6
etc etc, does each record have to be added separately, or is there a way I can add a chosen number of records, lets say 10, and have the value field increase by one each time?
sometimes I might have 30+ simple records that need adding quickly, and each time the first records value will be one, and each record after will increase by one, is there a way to solve this problem or does each record have to be added separately?
Are you talking databases, or html tables, or ASP arrays?
Is "adding" adding new records, or adding values of fields?
If I surmize correctly, ASP + HTML table + new records adding:
<table>
<%
for n=1 to 100
t = "<tr><td>ab c</td><td>" & n & "</td></tr>"
document.write t
next
%>
</table>
not tested
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Evertjan. wrote on 06 feb 2004 in microsoft.publi c.inetserver.as p.general: <table> <% for n=1 to 100 t = "<tr><td>ab c</td><td>" & n & "</td></tr>" document.write t next %> </table>
not tested
response.write
so much for not testing ;-{
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
i am talking about adding records to an access db, using asp.
i need a user to be able to select a number of records to add , ie 20 click
go and a script somehow adds 20 records to the access db, but the value
field must increase by one each time one of the 20 records is added.
hope that makes snese
"Evertjan." <ex************ **@interxnl.net > wrote in message
news:Xn******** ************@19 4.109.133.29... Evertjan. wrote on 06 feb 2004 in microsoft.publi c.inetserver.as p.general:
<table> <% for n=1 to 100 t = "<tr><td>ab c</td><td>" & n & "</td></tr>" document.write t next %> </table>
not tested
response.write
so much for not testing ;-{
-- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
Jamie Fryatt wrote on 06 feb 2004 in
microsoft.publi c.inetserver.as p.general: i am talking about adding records to an access db, using asp.
i need a user to be able to select a number of records to add , ie 20 click go and a script somehow adds 20 records to the access db, but the value field must increase by one each time one of the 20 records is added.
hope that makes snese
Oh yes it does, [though we are out of snese over here at present]
<%
'' open the database
a = 123
for n=a ot a+19
sql="INSERT INTO MyTable VALUES ('abc', " & n & ")"
CONNECTION.Exec ute(SQL)
next
%>
It would be better to use an autoincrement field
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jamie Fryatt wrote: i am talking about adding records to an access db, using asp.
i need a user to be able to select a number of records to add , ie 20 click go and a script somehow adds 20 records to the access db, but the value field must increase by one each time one of the 20 records is added.
For real efficiency, make the [value] field an autonumber field (per
Evertjan's suggestion), and then create a table called Numbers containing a
single field called Limit in your database and add 20 (or however many
records you intend the user to be able to add at a single shot) records to
the table, like this:
1
2
3
4
5
6
....
20
Then create a saved parameter query in Access called qAddXrecords, with the
following SQL :
Insert Into tblName (name)
Select [pName] FROM Numbers
WHERE [limit] <= [pLimit]
Test the query by running it. Access will prompt you for the values for the
parameters. Once you have verified that it works, save the query, then, in
ASP, do this:
'open a connection, using a variable called "cn", then:
cn.qAddXrecords "abc",20
HTH,
Bob Barrows
PS. "name" and "value" are reserved keywords and should not be used for
object names in your database. See here for the list of words to avoid: http://www.aspfaq.com/show.asp?id=2080
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Bob Barrows wrote on 06 feb 2004 in
microsoft.publi c.inetserver.as p.general: PS. "name" and "value" are reserved keywords and should not be used for object names in your database. See here for the list of words to avoid:
The good thing about programming in another language than English is that
we nearly never encounter such mistakes.
We, overhere, would call the fields "naam and "waarde".
;-}
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Eric Petruzzelli |
last post by:
If I fill my dataset and there is no data. The dataset is still created
with zero rows (all columns are there). When I add my first row using
the script below, it takes over 2 seconds to add??? If I add the second
row, instant.
How can I eliminate this delay?
|
by: David |
last post by:
Hi,
I have an order form which has a field 'ProductID'.
This form has a button on each record to open a new form linked by
ProductID.
This new form is a continuous form and obviously, only displays the
records associated with that ProductID.
Basically this is part of a Product Packing Pick System. From my
products table, each product has a set default amount of items which
|
by: Jim Heavey |
last post by:
Trying to figure out the technique which should be used
to add rows to a datagrid. I am thinking that I would
want an "Add" button on the footer, but I am not quite
sure how to do that. Is that the best method? Do you
have a sample of how to do this?
|
by: Tor Inge Rislaa |
last post by:
Prevent Adding new records in DataGrid
Hi I have a DataGrid that I want to open for editing but the user should not
be able to add new records. When I set the ReadOnly = False it is possible
to edit but it is also able to add new records. How do I prevent that?
|
by: Rudy |
last post by:
Hi all,
I know this is easy, just can't seem to get it. I have a windows form, and
a text box, with a value already in it. I need to add that value to a table.
It's just one value, so the entire row doesn't get filled. I have a
connection and all that stuff.
Private Sub btnPlaceBet_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnPlaceBet.Click
' Dim Myds As Footbet.DStable
'...
| |
by: shumaker |
last post by:
I'm wondering if adding an autonumber primary key will improve the
performance of a multiuser access database on a network share. I have
a website that lists many tips for improving performance of access, but
doesn't mention primary keys.
However, it seems logical to think that having no primary key means
that when a user updates a record, the database has to do comparisons
on multiple fields to identify the specific record being...
|
by: Kadett |
last post by:
Hi all, I have following problem: I'm creating a ListView (Details) control
at run-time and filling it with some records (let's say 10 000). This
operation seems to be quite fast, but when I call Controls.Add(list),
where list is my ListView control, then program hangs for minute. It seems
like this time depends on number of records added to control. So probably
when adding control to my form, those records are actualy added at this time...
|
by: vbDavidC |
last post by:
I am adding a new record to a table via a dataset/adapter.
I have got the following to work for me but I am wondering if there is
a better way to do this.
I am having to have something in my DS before I can add records, since
DS does not exist. I'd rather not have a SELECT since I really don't
need any records in my dataset that I will be adding a new record to.
Dim dsNewRow As DataRow
|
by: darrel |
last post by:
HI vb Wizards, good day, just wanted to ask if somebody there can help me iwth my problem. Am having difficulty in adding up records in my table, the table is in Microsoft Access format.
It Like this when i run my program, there no conflicts at no error pop up message or anything. but not satisfied with the outcome, here my code:
Private Sub Command3_Click()
Dim rsShowRec As New ADODB.Recordset
Dim cnn As New ADODB.Connection
Set...
|
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,...
|
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...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |