473,326 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Questions pertaining to adding rows in a recordset.

I have a couple of questions about recordsets:

1. When a recordset is summoned by the code where does it actually exist and in what form...is it created in the database (data source location) as a new table that mimics the actual database table and contains the fields and rows asked for in the query? It is somewhat vague as to it's true nature in the materials I have rummaged through lately.

2. When an UPDATE code command is given does the edited value on the recordset immediately get placed in the actual corresponding table in the database...or does the edited value get changed on the recordset and then after the recordset session is closed the recordset passes the edited values to the permanent table in the database.

3. Finally, When new rows are added to a recordset using ADDNEW I believe that the new rows must be unique in the sense that they cannot overwrite already existing rows that have the same fields, query indexes, and the same information. For example if one were to have a row of data on a table in the database/recordset with a timestamp field (the field the query for the recordset was based on) for 200 hrs and another field on the same row that held the water temperature for that time, could one add a new row of data with the exact same time stamp and data value or would an error message be produced. Or would the new row be created and simply be a duplicate row that would be placed in the data base.

If you could clear this up it would be appreciated. Thanks
Mar 7 '07 #1
5 1581
vijaydiwakar
579 512MB
I have a couple of questions about recordsets:

1. When a recordset is summoned by the code where does it actually exist and in what form...is it created in the database (data source location) as a new table that mimics the actual database table and contains the fields and rows asked for in the query? It is somewhat vague as to it's true nature in the materials I have rummaged through lately.

2. When an UPDATE code command is given does the edited value on the recordset immediately get placed in the actual corresponding table in the database...or does the edited value get changed on the recordset and then after the recordset session is closed the recordset passes the edited values to the permanent table in the database.

3. Finally, When new rows are added to a recordset using ADDNEW I believe that the new rows must be unique in the sense that they cannot overwrite already existing rows that have the same fields, query indexes, and the same information. For example if one were to have a row of data on a table in the database/recordset with a timestamp field (the field the query for the recordset was based on) for 200 hrs and another field on the same row that held the water temperature for that time, could one add a new row of data with the exact same time stamp and data value or would an error message be produced. Or would the new row be created and simply be a duplicate row that would be placed in the data base.

If you could clear this up it would be appreciated. Thanks
Solutions
1. Recordset is pointer to context area its created on client machine but by assigning its cursorlocation property to server or to client lets the recordset use the consern liabraries of client or server machine
If ur thinking of recordset from db side then yes it is created on server whenevr the qry is get fired then context area is reserved for that qry
2. See whenevr any DML qry gets fired then from frontend u need to commit it i.e. u've to use explicit commit or rollback until that the changes are saved in buffer it doesn't affect the database directly
3. See the timestamp is mantainded by db itself so there is no duplicasy but suppose there is duplicasy then db (oracle) maintain it by using RowId so each and every record is unique

IF still some problem persists contact me
Mar 7 '07 #2
willakawill
1,646 1GB
1. You can consider a recordset to be an array with methods. The data is stored in memory on your local computer. You use the methods to get at the data in the array (or collection). The recordset object, depending on the type, maintains any required connection to the database.

2. The database is updated immediately with any changes unless there is a problem as below

3. New rows must be unique only if a field or combination of fields is set in the database to be unique. If the database is supplying a datestamp or autonumber field as the only unique value then you cannot screw it up. If, on the other hand, you are supplying the unique value you must be careful to not add a duplicate value that the database will reject. You can only add duplicate field values to fields that have been set up in the database to allow duplicates.
Mar 7 '07 #3
1. You can consider a recordset to be an array with methods. The data is stored in memory on your local computer. You use the methods to get at the data in the array (or collection). The recordset object, depending on the type, maintains any required connection to the database.

2. The database is updated immediately with any changes unless there is a problem as below

3. New rows must be unique only if a field or combination of fields is set in the database to be unique. If the database is supplying a datestamp or autonumber field as the only unique value then you cannot screw it up. If, on the other hand, you are supplying the unique value you must be careful to not add a duplicate value that the database will reject. You can only add duplicate field values to fields that have been set up in the database to allow duplicates.


Thanks for your assistance!
Mar 7 '07 #4
Solutions
1. Recordset is pointer to context area its created on client machine but by assigning its cursorlocation property to server or to client lets the recordset use the consern liabraries of client or server machine
If ur thinking of recordset from db side then yes it is created on server whenevr the qry is get fired then context area is reserved for that qry
2. See whenevr any DML qry gets fired then from frontend u need to commit it i.e. u've to use explicit commit or rollback until that the changes are saved in buffer it doesn't affect the database directly
3. See the timestamp is mantainded by db itself so there is no duplicasy but suppose there is duplicasy then db (oracle) maintain it by using RowId so each and every record is unique

IF still some problem persists contact me
Thanks for your assistance!
Mar 7 '07 #5
willakawill
1,646 1GB
Thanks for your assistance!
You are very welcome Joe
Mar 7 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: vasanth kumar | last post by:
Hi, I want to add a row to library table. Table has total 7 fields. But I want to create the new row with 5 field data. When I run the following query in MS Access strQ = "INSERT into library...
8
by: Mike | last post by:
Hello, I have a few rather urgent questions that I hope someone can help with (I need to figure this out prior to a meeting tomorrow.) First, a bit of background: The company I work for is...
3
by: Hasanain F. Esmail | last post by:
Hi, Your help will be greatly appriciated. I have a table with following fields. Table's name is tblTicketNumers TicketNumberID (It is a key field) TicketNumber (Text field) AgentsName (Text...
1
by: Ryan | last post by:
Hello, I have a quick question (I hope). I have a form with a combo box and a multi-selection list box. The list box is based on a query. Users can select values from the cmbobox to add to...
1
by: E.T. Grey | last post by:
Hi All, Despite spending the past six to seven hours perusing the docs on the mySQl site, I still have questions unanswered, and have been unable to get any help. I am familiar with Sybase, some...
2
by: Bob | last post by:
Hi, In aspx file, i have a table: <asp:Table ID="table1" runat="server"> </asp:Table> In the code-behind, i create rows and cells: For i = 0 To 50 r = New TableRow() for j = 0 To 20
16
by: marc_r_bertrand | last post by:
To all asp/db pros: The quiz code below works. But there is a problem when too many questions are answered (radio buttons clicked). I am not an asp pro. So, is there a pro out there or an...
4
by: Drew | last post by:
I posted this to the asp.db group, but it doesn't look like there is much activity on there, also I noticed that there are a bunch of posts on here pertaining to database and asp. Sorry for...
2
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.