Le jeudi, 31 jul 2003, à 15:46 Europe/Paris, Brad Bennett a écrit :
I am new to programming with Real Basic, and have a few simple
questions
regarding use of the RealDatabase. (tried to query the listserver
archive,
but it does not appear to work).
1. How can you get the number of records returned by a SELECT query?
I
note that the documentation states that the RecordCount parameter is
not set
for RealDatabase queries (or rather this parameter is only set for a
few
other types of Databases, but not the RealDatabase). Seems a bit odd.
2. You can INSERT data into the RealDatabase with a SQL command when
the
data is directly contained within the SQL statement, e.g.:
dbNew.SQLExecute("INSERT INTO general
(max_layers,winX,winY,winToolX,winToolY) VALUES (1,0,20,20,40)")
but it does NOT seem that you can INSERT data into the RealDatabase
with the
INSERT SQL statement when data is contained within declared variables,
e.g.:
dbNew.SQLExecute("INSERT INTO general
(max_layers,winX,winY,winToolX,winToolY) VALUES
(my_max_layers,my_winX,my_winY, my_winToolX, my_winToolY)")
Not really :
query = "INSERT INTO general (max_layers, winX, winY, winToolX,
winToolY) VALUES .../...
("+ str(my_max_layers)+", "+str(my_winX)+", "+ str(my_winY)+", "+
str(my_winToolX)+", "+str(my_winToolY)+")"
dbNew.SQLExecute(query)
This should works.
Regards.
------------------------------------------------------------------------
---
Stéphane Pinel
Information System
Equinox Partners Paris
iChat/AIM: s.pinel
------------------------------------------------------------------------
---
---
A searchable archive of this list is available at:
<http://support.realsoftware.com/listarchives/search.php>
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>
.
|