New topic in Getting Started: 

Database - very slow fields reading

Hector - Mon May 05, 2008 2:50 am

<http://forums.realsoftware.com/viewtopic.php?t=22196>
                                                                                
                                                                                
Experimentig with Database application example from RS.
There is a RS DB with 7 fields (all strings, to simplify testing) and a Listbox 
which is filled with records. When I click ("change") a row, fields must be 
copied into Editboxes.
I added a time counting box to display how long it takes to fill the editboxes.

Everything is ok when I only extract then 'email' field, which happens to be 
the very first into the record. The counter shows about 0.15 msec.
If I extract a different field or more then one,  time increases to something 
between 400 and 900 msec (up to 4000 times slower!)
More problematic, in the 2° situation clicking the listbox gives an answer 
every other time (like a Flip Flop).

I use RB2008 (last release) with WinXP SP2.

This the section of code used:
Code:// Get all of the information for the selected customer record
rs = App.mailerDB.SQLSelect("SELECT * FROM Contatti WHERE IDcontatto = '"+ 
me.Cell(me.ListIndex, 6) +"'")

t0=Microseconds
// Display the customer data for editing
contattoEmail.Text = rs.Field("email").StringValue
'txID.Text = cstr(rs.Field("IDcontatto").IntegerValue)
'datIns.Text = rs.Field("dataIns").StringValue
'datInvio.Text = rs.Field("dataInvio").StringValue
'numInvii.Text = rs.Field("invii").StringValue
'chkSelvino.Value =( rs.Field("perSelvino").StringValue="si")
'chkCliente.Value =( rs.Field("cliente").StringValue="si")

micro.Caption = cstr((Microseconds-t0)/1000) + "msec"
// close the recordset
rs.close
                                        
                                                                                
                                                                                
                                                                                
                                                                                
                                        



-- 
Over 900 classes with 18000 functions in one REALbasic plug-in. 
The Monkeybread Software Realbasic Plugin v8.1. 

&lt;http://www.monkeybreadsoftware.de/realbasic/plugins.shtml&gt;

[email protected]

Reply via email to