multiple appends

This is a discussion on "multiple appends" within the Databases section. This forum, and the thread "multiple appends are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Databases

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 18th, 2003, 16:52
Reputable Member
Join Date: Sep 2003
Location: USA
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
multiple appends

I'm using ADO to connect to an Access backend.

I've got multiple sets of values (records) to append to my database. Is there a way I can do this all in one query or do I have to do one query for each record?

Thanks
jakyra

  #2 (permalink)  
Old Sep 22nd, 2003, 11:44
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts
one by one unfortunately, you may be able to use a loop to speed things up?
  #3 (permalink)  
Old Sep 30th, 2003, 09:17
Junior Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to djaccess
can you give me a rough idea of what your table looks like and the what the update query you are running looks like please
  #4 (permalink)  
Old Sep 30th, 2003, 14:11
Reputable Member
Join Date: Sep 2003
Location: USA
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
We do reviews of children's books. So we have bibliographic data (although authors/illustrators are in a many-to-many relationship with the books): Title, ISBN, publisher, etc; review data: reading level, genre, culture, and reviewer; and state information: editing status, etc.

The update query will be pulling data from an array of classes and, for one, will look something like this:

INSERT INTO Table( Title, PublicationDate, Publisher, ISBN, OriginalDate, Pages, Price )
Values ("Title1" , 2003 , 5 , "0-12-345678-9", 0, 32 , 16.99)

Thanks
jakyra
  #5 (permalink)  
Old Sep 30th, 2003, 14:23
Junior Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to djaccess
What are you using to get this information to update, where is it coming from a web page (asp) or a spread sheet (excel), can i see yopu sql coding for the update, there is a alternative wehere you could generate a macro in access but need to know how you data is be prepared to be imported
  #6 (permalink)  
Old Sep 30th, 2003, 14:47
Reputable Member
Join Date: Sep 2003
Location: USA
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
This isn't being done in Access; This is a web app. It's data coming from a class modual.

I haven't written the update page yet because I wanted to see if I could do something like load the data into an array and append the whole array at one time.

I can't use an Access macro. I'm on the server.
  #7 (permalink)  
Old Sep 30th, 2003, 14:57
Junior Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to djaccess
Can i see the first page of where you are entering the data into so i can get an understanding of what you are trying to put into the tables, because if you are wanting to enter a mass amount of data you have got to input it some where, this is what i need to see.
  #8 (permalink)  
Old Sep 30th, 2003, 15:43
Reputable Member
Join Date: Sep 2003
Location: USA
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
I can't show you the code because it's not written yet.

I'm not getting the data that I upload to the database from a form. I'm getting it from a download from another website (the Library of Congress). My users enter ISBNs, I validate them, then I send the ISBNs to the LOC and I get back a datastream.

Then, I take the data from the LOC download, organize it, clean it up, and put the data into a class. I get several books at one time, so I have an array of these classes.

I get the data out of the classes with methods like books[i].GetTitle, books[i].GetPages, books[i].GetYear, etc. and loop through the array.
  #9 (permalink)  
Old Sep 30th, 2003, 15:54
Junior Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to djaccess
the easist way to do this is to right a simple vb script to get you download data into csv format and then upload it to the database that way. i have done something like this a few years ago ill see if i can dig out the script
  #10 (permalink)  
Old Sep 30th, 2003, 18:49
Reputable Member
Join Date: Sep 2003
Location: USA
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks!
  #11 (permalink)  
Old Sep 30th, 2003, 20:03
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
You can also use a batch update where you open a recordset to the data, add all your new rows, then update the database. In this case you'd be using a recordset object instead of using SQL strings to update the database (assuming you're using ASP).
  #12 (permalink)  
Old Oct 3rd, 2003, 18:59
Reputable Member
Join Date: Sep 2003
Location: USA
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
So I've got 3 choices
1) open the recordset and do "manual" appends (I've done this in VBA)
2) write the information to a file, then upload that to the recordset. (Haven't done this)
3) do successive append queries.

right?

My question is now: how expensive are these methods? What am I looking at for server load? My understanding is that holding a recordset open is quite expensive.

I'm looking at up to 40 records for one group of data, and 80 for the other.

Thanks
jakyra
  #13 (permalink)  
Old Oct 4th, 2003, 22:33
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
<blockquote id="quote"><font size="1" face="geneva, verdana, arial" id="quote">quote:<hr height="1" noshade id="quote">Originally posted by jakyra
[I'm looking at up to 40 records for one group of data, and 80 for the other.
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

How many people are running an update at one time and/or how often are they doing it?
  #14 (permalink)  
Old Oct 6th, 2003, 16:18
Reputable Member
Join Date: Sep 2003
Location: USA
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
I have a pretty low volume site.

There might be a few times that more than one submission will occur simultaniously, but I think that quite often there will only be one. I imagine that there will be some peak times where I could get as many as 8 running it at one time, but those would be low volume entries (1-2).

For each person, the submissions should be happening more on a monthly/bi-monthly basis. I would be surprised if people use it more often than that. Some people will only enter once a year.

jakyra
  #15 (permalink)  
Old Oct 8th, 2003, 17:01
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
I wouldn't worry about the overhead of either of the methods with that kind of load. Not that it isn't good to think about, but probably not worth investing the time in optimizing.
  #16 (permalink)  
Old Oct 8th, 2003, 21:37
Reputable Member
Join Date: Sep 2003
Location: USA
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
Yeah, this database is a lot about me practicing good technique. It's a low load, special interest site that I don't want the general public even knowing about. I have security, but it's certainly crackable. But part of the purpose for me is learning good techniques so that when I move up to a larger system with more people I have high efficiency, etc.

Thanks
jakyra
Closed Thread

Tags
multiple, appends

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
multiple rollover images change multiple images joshlindem Web Page Design 4 Apr 18th, 2008 09:11
Multiple web browsers AdRock Webforumz Cafe 14 Oct 1st, 2007 12:36
Multiple Where Clauses nate2099 Databases 2 Sep 13th, 2007 20:43
Multiple IE's moojoo Webforumz Cafe 6 Jul 16th, 2007 21:50


All times are GMT. The time now is 05:12.


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