5 Replies - 974 Views - Last Post: 29 June 2013 - 09:41 PM Rate Topic: -----

#1 chegekim  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 25-June 13

Unable to update many records at ago

Posted 25 June 2013 - 07:12 AM

Dear Good people,

I am Simon.

I have a form i am using to try and grade students. I am to search and display Students from tblStudents to respective text boxes.

I have 7 Subjects that i would like to enter for each student displayed. Of course the students are displayed one at a time.

I would like a way of updating the underlying table (tblScores) which has the following fields:
scID, scRegNo, scSubCode, and scScore. scID is autonumber and a Primary Key, scRegNo is Foreign Key to table tblStudents (stdRegno), scSubCode is foreign key to table tblSubjects (subCode) and scScore holds the score for each subjects.

Now, here the problem comes, how do i ADD multiple subjects to the table tblScores at once and not one at a time? Any idea? Is there anything like batch updating? I don't know. I will appreciate your input.

Thank you.

Simon

Is This A Good Question/Topic? 0
  • +

Replies To: Unable to update many records at ago

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9059
  • View blog
  • Posts: 34,021
  • Joined: 12-June 08

Re: Unable to update many records at ago

Posted 25 June 2013 - 07:17 AM

What's the reasoning for the batch entry requirement versus one at a time?
Was This Post Helpful? 0
  • +
  • -

#3 chegekim  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 25-June 13

Re: Unable to update many records at ago

Posted 25 June 2013 - 11:05 PM

View Postmodi123_1, on 25 June 2013 - 07:17 AM, said:

What's the reasoning for the batch entry requirement versus one at a time?


Thank you for your reply and for your time.

In fact i have just read about batch updating, where you update many tables at ago, but what i need is multiple records update/add in one single table. I am using MS Access.MDB database as my back end.Currently i am using a one-at-a-time method and is quite laborious and you know what I am lazy fellow.

I have a form where i want to have a list of Subjects and text boxes against each subject where you type in the score and then update the underlying table. Assuming you have 30 students per class, each students takes 7 subjects and you have say 5 classes, that means you will have to click update button (30*7*5) times. But if i could be able to update 7 subjects at ago for each student it can reduce the work to (30*1*5)clicks.

I have attached a screen shot for more details.

Thank you.

Regards,

Chegekim

Attached image(s)

  • Attached Image

Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9059
  • View blog
  • Posts: 34,021
  • Joined: 12-June 08

Re: Unable to update many records at ago

Posted 26 June 2013 - 06:47 AM

Databases work on transactions.. eventually it will come down to a single insert statement for each record. You can hide it in a stored procedure, or through some fancy hand waving, but _A_ table needs _A_ insert statement for _A_ record.
Was This Post Helpful? 0
  • +
  • -

#5 chegekim  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 25-June 13

Re: Unable to update many records at ago

Posted 26 June 2013 - 07:00 AM

View Postmodi123_1, on 26 June 2013 - 06:47 AM, said:

Databases work on transactions.. eventually it will come down to a single insert statement for each record. You can hide it in a stored procedure, or through some fancy hand waving, but _A_ table needs _A_ insert statement for _A_ record.


Thanks

chegekim
Was This Post Helpful? 0
  • +
  • -

#6 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 574
  • View blog
  • Posts: 2,989
  • Joined: 19-May 09

Re: Unable to update many records at ago

Posted 29 June 2013 - 09:41 PM

All that notwithstanding, you can do this: Insert into myTable (select * from Anothermatchingtable). If you want to get more complicated than that, there are many examples you can find by googling.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1