How to use Automatic query builder to insert a record!

Jan Schenkel janschenkel at yahoo.com
Thu Aug 7 00:53:00 EDT 2003


--- Andre Garzia <soapdog at mac.com> wrote:
> Hi Folks,
> 
> I just moved from my rev 1.0 to rev 2.0 and well,
> it's 2:38 in the 
> morning and i can't stop coding. I am exploring the
> new database 
> features and I have a doubt. I made a simple address
> book app for me, I 
> am using a MySQL database and using automatic query
> builder. All my 
> fields are being updated correctly and my navigation
> buttons working 
> fine, I can explore and modify my database with no
> trouble, but if I 
> want to add a new record? how am i supposed to go?
> is there any way to 
> do so without scripting? Can someone help me, this
> will be fundamental 
> do my decision to buy revolution this week or next
> month (my salary is 
> short, but if this is as easy as i think it is, then
> God, i'll just 
> have to buy it asap!!!!)
> 
> Cheers
> Andre Garzia 


Hi Andre,

You'll have to do a tiny bit of scripting, but it's
really easy -- suppose the name of your query is
"Foobar", then create an Insert button and set its
script to :

--
on mouseUp
  revExecuteWithQuery "Foobar", \
     "INSERT INTO users VALUES(2003,'Andre Garzia')"
end mouseUp
--

Hope this helped,

Jan Schenkel.

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

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com



More information about the use-livecode mailing list