-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
The command you need to look at is revOpenDatabase; you can find that in the docs.
If that function returns an integer, it is the handle number of the opened connection. Otherwise, it is an error message explaining why the connection failed.
So you need something like this:
global dbconn
function amIConnected
put revOpenDatabase("mysql", field "Hostname", field "Database Name", field "Username", field "Password", the hilite of button "Use SSL") into dbconn
if dbconn is an integer then
return "Connected"
else
return "No Connection"
end if
end if(note: button "Use SSL" is a checkbox here)
Don't forget to close the connection when you are finished with it:
revCloseDatabase dbconn
On Apr 29, 2005, at 3:47 PM, Paul Salyers wrote:
Dear Rev Programmers
I need a simple small stack that will try and connect to a MySQL db on a server shell.
If it connects ok I want a message that says Connected else No Connection
Anyone have such a stack.
I don't know how to do this but I would think there should be 3 test boxes:
URL, db login, db password
Can some1 help
Paul Salyers PS1 - Senior Rep. [EMAIL PROTECTED] Http://ps1.SoftSeven.org
_______________________________________________ use-revolution mailing list [email protected] http://lists.runrev.com/mailman/listinfo/use-revolution
- ----------------------------------------------------------- Frank D. Engel, Jr. <[EMAIL PROTECTED]>
$ ln -s /usr/share/kjvbible /usr/manual
$ true | cat /usr/manual | grep "John 3:16"
John 3:16 For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.
$
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
iD8DBQFCcpJm7aqtWrR9cZoRAnAsAJ9FBLP/W0F7ZGNBg1pBoJQgFcU4fwCfdaD8 6Mypu8CVyxh4f7uN/CRkMTw= =p2lo -----END PGP SIGNATURE-----
___________________________________________________________ $0 Web Hosting with up to 200MB web space, 1000 MB Transfer 10 Personalized POP and Web E-mail Accounts, and much more. Signup at www.doteasy.com
_______________________________________________ use-revolution mailing list [email protected] http://lists.runrev.com/mailman/listinfo/use-revolution
