Re: Updating Tables
From: Wart (nospamWart_at_epix.net)
Date: 12/07/04
- Next message: Wart: "Re: convert recordset fields collection to generic collection of fields?"
- Previous message: Wart: "Re: Concurrent Data Retrieval"
- In reply to: Shawn Fessenden: "Updating Tables"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 7 Dec 2004 17:49:36 -0500
Shawn,
Another idea would be to use a query like "select * from foo where 1 = 0".
This will return no rows and is fast if you want to use the initial method
you outlined.
HTH,
CF
"Shawn Fessenden" <shawn#no#@testech-ldt.#spam#com> wrote in message
news:RV6sd.38511$Qv5.18758@newssvr33.news.prodigy.com...
>I have a large table in a MySQL database. To add records to this table, I
> usually do:
>
> ' Connect to db. Connection is cn.
> Set rs = new ADODB.Recordset
> rs.ActiveConnection = cn
> Call rs.Open("select * from foo")
>
> ' Update.
> Call rs.AddNew
> ' copy fields.
> Call rs.Update
> ' Close, etc.
>
> However, when "select * from foo" is executed, it takes quite a while to
> read the entire table. How can I simply append a record to a table without
> reading the entire thing?
> -SHAWN-
>
>
- Next message: Wart: "Re: convert recordset fields collection to generic collection of fields?"
- Previous message: Wart: "Re: Concurrent Data Retrieval"
- In reply to: Shawn Fessenden: "Updating Tables"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|