Database Question From RunRev Newbie
janschenkel at yahoo.com
Mon Feb 7 16:48:07 EST 2005
--- Jay Busari <jay.busari at gmail.com> wrote:
> Hi Jan,
> I noticed that you replied to a problem from John
> Miller in the RunRev
> lists...and he seems to have solved his problem with
> your advice.
> I'm new to RunRev. I have a Sybase database running
> with the ability
> to connect via JDBC drivers.
> I also have ODBC drivers (from OpenLink), but
> haven't tried using them
> with Sybase. I am doing the RunRev development on
> When I create a new main stack, I don't get the
> ability to configure
> the Database Query Builder (it's all greyed out). I
> believe getting
> this "working" would be a first step to actually
> doing the
> revQueryDatabase function call.
> How do I get RunRev to "use" the ODBC drivers from
> OpenLink and connect
> to my (Sybase) database ?
> Thank you for your help,
Let me start by apologising for the delay in reply --
I've been mighty busy lately, and have only just begun
to keep up again with the abundance of emails on the
Speaking of the list, you may want to post your
questions there in the future : there are planty of
smart database-wielding Rev developers on the list,
more than willing to answer your questions.
That being said, let me see how I can help you.
The first important thing to note is that the Database
Query Builder stores the queries inside the stack
where you use them. So you will need to open a new
stack forst, or open your current project stack, and
then open the Database Query Builder.
Now that you have your stack and the query builder
open, you need to create a new query by clicking the
'+' button in the topright of the screen.
Rename the query name to something more useful, then
change its type to ODBC and enter the name of the DSN
(Data Source Name) -- in case you haven't created that
yet, now is a good time to go to the iODBC preference
panel and create it.
After that, return to Revolution and complete the
connection settings by entering the user and password.
Then click the 'Connect' button. If all works as
planned, you will receive no error message, and the
Connection status in the bottomright will read
If so, go ahead to the 'Record Set' tab, and enter
your SELECT statement -- if there's not much data, I
suggest you also tick the 'Cache record set' checkbox.
When you have the right SQL query, you can start
linking fields and buttons to this query : drag some
fields to your stack, open the Inspector palette and
go to the 'Database' pane.
There you select the name of the query that you just
created, and pick one of the columns to display. In a
similar fashion, drop a few buttons onto your stack,
and use the Inspector palette to edit their database
Here you pick the same query, and assign an action :
Move to the first record, move to the previous record,
move to the next record, move to the last record,...
I hope this quick intro help you on your way,
Quartam - Tools for Revolution
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
More information about the Use-livecode