Database management

Jan Schenkel janschenkel at yahoo.com
Thu Aug 7 02:30:01 EDT 2003


--- 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é
> 

Hi André,

Even though I don't use ODBC that often, I think I see
the problem : 
- the second parameter might be better set to
'localhost' if it's not running on a different
computer ;
- the third parameter has to be the name of the DSN as
you defined in the ODBC COntrol Panel, not the path to
the Access database.

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