| To: | REALbasic Betas <realbasic-betas at lists dot realsoftware dot com> |
|---|---|
| Subject: | Re: REALbasic and MySQL-database |
| From: | Jerry Hamlet <jerry at hamletzone dot com> |
| Date: | Mon, 29 Jul 2002 04:58:22 -0700 |
| Cc: | Luc Bressinck <bressinck dot luc at pi dot be> |
On 7/29/02 3:50 AM, "Luc Bressinck" <bressinck dot luc at PI dot BE> wrote:
> Hello,
>
> I have the plugin MySQL Plugin version 1.0.3.
> I want to connect to an mysql-database (in OS X, I have Mysql installed) but
> there is no OPEN function for mysql (there is one e.g. For OpenBase:
> OpenOpenBaseDatabase).
> How do I open the database?
>
First create an instance of the MySQLDatabase
Dim db As MySQLDatabase
db = new MySQLDatabase
Second, set the parameters for your particular database:
db.Host = "localhost"
db.DatabaseName = "Database"
db.UserName = "John"
db.Password = "Hancock"
Finally, connect to your database with the Connect method, checking the
return value for an error:
if NOT db.Connect() then
MsgBox "Couldn't connect to database: " + db.ErrorMessage
Quit
end if
-jerry
+---------------------------------------------------------------------+
| |
| H a m l e t z o n e |
| |
| w e b d e s I g n & p r o g r a m m i n g |
| |
| w w w . h a m l e t z o n e . c o m |
| |
| jerry at hamletzone dot com |
| |
+---------------------------------------------------------------------+
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: REALbasic and MySQL-database, Stéphane Pinel |
|---|---|
| Next by Date: | Re: REALbasic and MySQL-database, Paul Harvey |
| Previous by Thread: | Re: REALbasic and MySQL-database, Stéphane Pinel |
| Next by Thread: | Re: REALbasic and MySQL-database, Paul Harvey |
| Indexes: | [Date] [Thread] [Top] [All Lists] |