how to reset the cursor after running an SQL statement with Do Until

From: Tabitbol (anonymous_at_discussions.microsoft.com)
Date: 02/24/04


Date: Mon, 23 Feb 2004 16:26:06 -0800

Hi
 A form had 35 text_box

I have a table with 40.000 records and with 35 fields
when I save a new record it took 3 minutes

I decided to split this table (35 fileds) into 7 tables (with only 5 fields each)
I minimize the length on each field ( text max 50)

I created 7 recordsets for each table … mors_1…and / Strsql = Select * from tbl_1
and I saved the new record into 7 tables

   A …. firs I save tbl_1
           tbl_1 primary key is “ auto number “
   B. then I save tbl_2
           tbl_2 primary keys is >> primary keys from tbl_1
   
  C Then I save tbl_3…………………
         tbl_3 primary keys is >> primary keys from tbl_1…….4,5,6,7

is still taking around 5 minutes to save all this tables

What will be the best approach to save faster

Thanks

TA

Hi Tsevy, before add a new record open a recordset empty,

Rs.Open "Select * from tbl_1 WHERE 1=2",.......
Rs.Addnew
.......
.......
Rs.Update

Hi
 I have a tables with 30.000 records
I use dataGrid to load the data that the user will search for ex:
Strsql = “SELECT * FROM tbl_transaction WHERE transact_ID = 4”
mors.open strsql,goconn, adOpenFowardOnly,..
 Do until mors.EOF
DataGrid.AddItem strline
ors.Movenext
loop

after the records found are loaded into the dataGrid

this is my dilemma
I cannot click on the “Next” or “Previous” button because the cursor is at the End of the record or and of the Do Until loop

I need to select “ cancel” that will run a select statement > select * from tbl_transaction
to refresh the data then I can click on the “next” button

because I have 30.000 rows it takes a few minutes

is there another way to refresh the data?/

thanks

TA