Database management

Chris Sheffield cm_sheffield at yahoo.com
Thu Aug 7 09:41:00 EDT 2003


I could be wrong, but I think I may have a solution.

If I remember correctly, you cannot directly connect
to a remote database using ODBC.  It just doesn't work
(limitiations with ODBC itself).  So I'm not even sure
that using the revOpenDatabase function in this case
will work (someone correct me if I'm wrong).  I think
what you have to do instead is invoke your CGI
script/ASP page (which should have code to connect to
your database on the server via the DSN) from within
Rev.  You should be able to use the 'revGoURL' command
to send data using the GET method, or the 'post'
command to send it with the POST method, appending
your data to the end of your URL.  Hopefully you're
familiar with these methods and how to parse data sent
from a web form to a CGI script/ASP page.

If you want to access a remote database directly from
Rev using its database functions, you're probably
going to have to use something other than ODBC, such
as a direct connection to a MySQL database.

Hope that helps,
Chris Sheffield

--- Andre Rombauts <andre.rombauts at win.be> wrote:
> Hello all!
> 
> I've posted several messages related to database
> management and CGI scripting with Revolution 2.02
> but don't need any answer... :-(
> Are my questions so stupid? I am an educator, not a
> professionnal programmer...
> 
> Presently I have problems to get linked to an online
> ODBC database. Here is the script... Can anyone give
> some help? Everything is OK when the same script is
> used to access the dbase locally (using <put
> revOpenDatabase("ODBC","revo",,,) into myDB> with a
> DSN defined with the ODBC database source manager).
> The database is a MS Access db. It has no user or
> psw defined. I'm using this on a PC XP Home machine.
> on mouseUp
> 
> local myDB,myRecSet
> put
>
revOpenDatabase("ODBC","myserver.org","/myserver.org/db/revolution.mdb","","")
> into myDB
> put the result into field "Errors"
> put revQueryDatabase(MyDB,"SELECT * FROM Users where
> id = 4") into myRecSet
> put revDatabaseColumnNamed(myRecSet,"noun") into
> field "MyData"
> revCloseDatabase MyDB
> 
> end mouseUp
> 
> The Errors field shows [Microsoft][ODBC driver
> manager] Unavailable datasource and unspecified
> driver name
> 
> This message is shown immediately and it seems
> access to the Internet is not even launched thus I
> guess this is a problem locally... Do I need to use
> a DSN here too? How.
> 
> ...
> 
> 
> 
> André
> 


=====
Chris Sheffield
Read Naturally
www.readnaturally.com

__________________________________
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