It has been a long time since I have done any VB so and I know you people can get me going faster than I can do this myself.
I have the following code which is opening a table and putting records inside of it. The end goal of my program is to read a spreadsheet and insert all the rows in the spreadsheet into the table. My concern with the following code is that it is opening up the entire table of records and returning them. This isn't a big problem off the start but as they gets to be thousands of records this could be a problem. My question is am I right in thinking I have a problem. If I do how do I fix it so that I am not returning all the records but I can still update the table. There is no need to ever have any records in the recordset or if there was I would have all the records for a specific load which is recalled by a key in the table.
Set RSOpt= New ADODB.Recordset
RSOpt.CursorType = adOpenKeyset
RSOpt.LockType = adLockBatchOptimistic
RSOpt.Open "my_table", "connection_string", , , adCmdTable
RSOpt(1).Value = 1
RSOpt(2).Value = 4
RSOpt(3).Value = 1
RSOpt(4).Value = 1000