load database tables

Harvey Toyama harvey.toyama at qlogic.com
Mon Jun 20 12:54:52 EDT 2005


Hi,
I use MySQL with the commands below to put a table into a scrolling
field/buffer:

	get revDataFromQuery(comma,,dbID, sqlCmd)
	put it into fld "ScrollingField"

To put the table data into an array, use the "split" command on a line
buffer (referencing array[row][col] didn't work for me). 

	get revDataFromQuery(comma,,dbID, sqlCmd)
	put it into data_list
	put line vLineCount into vLineBuffer
	split vLineBuffer by comma
	-- The table row is now an array of data tokens

-- Harvey
-- 
 
-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Jan
Schenkel
Sent: Monday, June 13, 2005 1:11 PM
To: t; How to use Revolution
Subject: Re: load database tables

--- t <trknssr at gmail.com> wrote:
> hi,
> 
> I'm trying to load my database tables into a
> scrolling field, I
> connected to the database but I can't find a command
> to get the
> tables.
> 
> Is there a command that stores the tables in an
> array or a scrolling field.
> 
> thanx,
> -- 
> t
> 

Hi T,

There is an undocumented function 'revdb_tablenames'
that will give you the table names for a given
connection.

Example:
--
  put revdbconnect(...) into tCOnnectionID
  put revdb_tablenames(tConnectionID) into theTables
--

Unfortunately, it doesn't work for all databases, but
if it doesn't, other database users might be able to
give you a hand to construct the SQL needed to extract
the information.

E.g. for MS-Access, the SQL is something like:
--
  SELECT name FROM MSysObjects WHERE type IN (1,6)
  AND name NOT LIKE 'MSys%'
--

Hope this gets you a little closer to the solution,

Jan Schenkel.

Quartam - Tools for Revolution
<http://www.quartam.com>

=====
"As we grow older, we grow both wiser and more foolish at the same
time."  (La Rochefoucauld)


		
__________________________________ 
Yahoo! Mail Mobile 
Take Yahoo! Mail with you! Check email on your mobile phone. 
http://mobile.yahoo.com/learn/mail 
_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution



More information about the use-livecode mailing list