Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

Real Programmers think better when playing Adventure or Rogue.


programming / comp.lang.smalltalk.dolphin / Re: ReStore and MySQL

SubjectAuthor
* ReStore and MySQLMark Davis
`* Re: ReStore and MySQLJohn Aspinall
 `* Re: ReStore and MySQLMark Davis
  `* Re: ReStore and MySQLJohn Aspinall
   `- Re: ReStore and MySQLMark Davis

1
Subject: ReStore and MySQL
From: Mark Davis
Newsgroups: comp.lang.smalltalk.dolphin
Date: Tue, 11 Aug 2020 19:40 UTC
X-Received: by 2002:a05:620a:9d0:: with SMTP id y16mr2752474qky.353.1597174856843;
Tue, 11 Aug 2020 12:40:56 -0700 (PDT)
X-Received: by 2002:a9d:7349:: with SMTP id l9mr6680256otk.341.1597174856521;
Tue, 11 Aug 2020 12:40:56 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!peer03.ams4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Tue, 11 Aug 2020 12:40:56 -0700 (PDT)
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=99.203.23.71; posting-account=B_AeVAoAAAAlVQZCTCtq3cBfXWAXV3s7
NNTP-Posting-Host: 99.203.23.71
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <79f196bc-4fb9-4d7b-82a2-06a303b7d5c6n@googlegroups.com>
Subject: ReStore and MySQL
From: wade2de...@gmail.com (Mark Davis)
Injection-Date: Tue, 11 Aug 2020 19:40:56 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1391
X-Received-Body-CRC: 2531432800
View all headers
I've been using ReStore with MS Access for years. Current project requires MySQL. Unfortunately, the ReStore docs only cover generating tables in Access.  Are there any examples or a quick tutorial that shows how to generate tables from dolphin smalltalk using MySQL database?

Thanks,

Mark


Subject: Re: ReStore and MySQL
From: John Aspinall
Newsgroups: comp.lang.smalltalk.dolphin
Date: Wed, 12 Aug 2020 07:21 UTC
References: 1
X-Received: by 2002:ac8:458a:: with SMTP id l10mr5004037qtn.345.1597216894979;
Wed, 12 Aug 2020 00:21:34 -0700 (PDT)
X-Received: by 2002:a05:6808:683:: with SMTP id k3mr6209926oig.50.1597216894777;
Wed, 12 Aug 2020 00:21:34 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Wed, 12 Aug 2020 00:21:34 -0700 (PDT)
In-Reply-To: <79f196bc-4fb9-4d7b-82a2-06a303b7d5c6n@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=85.203.70.180; posting-account=OQ6sIwoAAAC1iWrFEUhdmRsgEkeDOgOm
NNTP-Posting-Host: 85.203.70.180
References: <79f196bc-4fb9-4d7b-82a2-06a303b7d5c6n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <36f5e5db-1eaf-41d1-ac27-b4adca16e359o@googlegroups.com>
Subject: Re: ReStore and MySQL
From: john.asp...@gmail.com (John Aspinall)
Injection-Date: Wed, 12 Aug 2020 07:21:34 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
View all headers
Hi Mark,

There shouldn't be any differences in generating tables in MySQL versus Access - ReStore should take care of any dialect differences.

The current ReStore documentation is linked from the github repository (see end of readme section):

https://github.com/rko281/ReStore

Let me know if you need any further info.

Cheers.

John


On Tuesday, August 11, 2020 at 8:40:57 PM UTC+1, Mark Davis wrote:
I've been using ReStore with MS Access for years. Current project requires MySQL. Unfortunately, the ReStore docs only cover generating tables in Access.  Are there any examples or a quick tutorial that shows how to generate tables from dolphin smalltalk using MySQL database?

Thanks,

Mark



Subject: Re: ReStore and MySQL
From: Mark Davis
Newsgroups: comp.lang.smalltalk.dolphin
Date: Wed, 12 Aug 2020 09:05 UTC
References: 1 2
X-Received: by 2002:a05:6214:a48:: with SMTP id ee8mr5570346qvb.53.1597223105136;
Wed, 12 Aug 2020 02:05:05 -0700 (PDT)
X-Received: by 2002:aca:ac53:: with SMTP id v80mr6408822oie.20.1597223104925;
Wed, 12 Aug 2020 02:05:04 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Wed, 12 Aug 2020 02:05:04 -0700 (PDT)
In-Reply-To: <36f5e5db-1eaf-41d1-ac27-b4adca16e359o@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=99.203.22.195; posting-account=B_AeVAoAAAAlVQZCTCtq3cBfXWAXV3s7
NNTP-Posting-Host: 99.203.22.195
References: <79f196bc-4fb9-4d7b-82a2-06a303b7d5c6n@googlegroups.com> <36f5e5db-1eaf-41d1-ac27-b4adca16e359o@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <45d815e9-6c3d-4194-9908-da1f22482c3en@googlegroups.com>
Subject: Re: ReStore and MySQL
From: wade2de...@gmail.com (Mark Davis)
Injection-Date: Wed, 12 Aug 2020 09:05:05 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
View all headers
Hi John,

I should have been more specific; the server is installed on a remote server. So, I have to provide an ip address in the script to get a connection? All smalltalk clients will access the server via ip address when deployed. So can only guess the ip address must be provided:

aRestore := SSWReStore new.
aRestore dsn: 'dbname=test_database;hostname=192.168.1.150'.
aRestore uid: 'root'.
aRestore pwd: '123456'.
aRestore useTransactionsWithoutVersioning.
aRestore supportsFullTableRecords: true.
aRestore connect.

afterwhich, the script adds the appropriate classes:

aRestore
addClass: ClassA;
addClass: ClassB;
addClass: ClassC.
aRestore synchronizeAllClasses.

aRestore disconnect.
aRestore := nil.

I'll give this a whirl in the morning and see how it goes.
Hopefully this is the correct procedure to connect to the remote server opposed to connecting to a database on the same dev machine.



Subject: Re: ReStore and MySQL
From: John Aspinall
Newsgroups: comp.lang.smalltalk.dolphin
Date: Thu, 13 Aug 2020 07:55 UTC
References: 1 2 3
X-Received: by 2002:ac8:6793:: with SMTP id b19mr3611541qtp.333.1597305343021;
Thu, 13 Aug 2020 00:55:43 -0700 (PDT)
X-Received: by 2002:a9d:4f04:: with SMTP id d4mr3098858otl.210.1597305342702;
Thu, 13 Aug 2020 00:55:42 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Thu, 13 Aug 2020 00:55:42 -0700 (PDT)
In-Reply-To: <45d815e9-6c3d-4194-9908-da1f22482c3en@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=85.203.70.180; posting-account=OQ6sIwoAAAC1iWrFEUhdmRsgEkeDOgOm
NNTP-Posting-Host: 85.203.70.180
References: <79f196bc-4fb9-4d7b-82a2-06a303b7d5c6n@googlegroups.com>
<36f5e5db-1eaf-41d1-ac27-b4adca16e359o@googlegroups.com> <45d815e9-6c3d-4194-9908-da1f22482c3en@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e0a75c3f-0d1a-455b-b4f4-c0f3cf5d71b4o@googlegroups.com>
Subject: Re: ReStore and MySQL
From: john.asp...@gmail.com (John Aspinall)
Injection-Date: Thu, 13 Aug 2020 07:55:43 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
View all headers
Hi Mark,

Specifying a connection via the dsn: message needs a defined data source name from the 32-bit ODBC control panel. I usually configure this as part of a deployed application's setup script.

Specifying a connection directly from application code needs the connectString: message using the parameter names for the particular database type you're using. Those for MySQL are detailed here:

https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-configuration-connection-without-dsn.html

For your example this would give (depending on the version of the MySQL ODBC connector you're using):

aReStore connectString: 'DRIVER={MySQL ODBC 8.0 ANSI Driver};SERVER=192..168.1.150;DATABASE=test_database;USER=root;PASSWORD=123456'.

Using a connection string in this way is supported in recent versions of ReStore. If you're using an older version let me know and I can supply a patch file to enable this.

Hope this helps.

John



On Wednesday, August 12, 2020 at 10:05:05 AM UTC+1, Mark Davis wrote:
Hi John,

I should have been more specific; the server is installed on a remote server. So, I have to provide an ip address in the script to get a connection? All smalltalk clients will access the server via ip address when deployed. So can only guess the ip address must be provided:

aRestore := SSWReStore new.
aRestore dsn: 'dbname=test_database;hostname=192.168.1.150'.
aRestore uid: 'root'.
aRestore pwd: '123456'.
aRestore useTransactionsWithoutVersioning.
aRestore supportsFullTableRecords: true.
aRestore connect.

afterwhich, the script adds the appropriate classes:

aRestore
addClass: ClassA;
addClass: ClassB;
addClass: ClassC.
aRestore synchronizeAllClasses.

aRestore disconnect.
aRestore := nil.

I'll give this a whirl in the morning and see how it goes.
Hopefully this is the correct procedure to connect to the remote server opposed to connecting to a database on the same dev machine.


Subject: Re: ReStore and MySQL
From: Mark Davis
Newsgroups: comp.lang.smalltalk.dolphin
Date: Fri, 14 Aug 2020 06:50 UTC
References: 1 2 3 4
X-Received: by 2002:ac8:6f22:: with SMTP id i2mr814965qtv.384.1597387804804; Thu, 13 Aug 2020 23:50:04 -0700 (PDT)
X-Received: by 2002:a9d:7349:: with SMTP id l9mr963682otk.341.1597387804561; Thu, 13 Aug 2020 23:50:04 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!tr2.eu1.usenetexpress.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Thu, 13 Aug 2020 23:50:04 -0700 (PDT)
In-Reply-To: <e0a75c3f-0d1a-455b-b4f4-c0f3cf5d71b4o@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=99.203.23.195; posting-account=B_AeVAoAAAAlVQZCTCtq3cBfXWAXV3s7
NNTP-Posting-Host: 99.203.23.195
References: <79f196bc-4fb9-4d7b-82a2-06a303b7d5c6n@googlegroups.com> <36f5e5db-1eaf-41d1-ac27-b4adca16e359o@googlegroups.com> <45d815e9-6c3d-4194-9908-da1f22482c3en@googlegroups.com> <e0a75c3f-0d1a-455b-b4f4-c0f3cf5d71b4o@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f93d326a-cbd9-4353-925d-7f9ce041d6c7n@googlegroups.com>
Subject: Re: ReStore and MySQL
From: wade2de...@gmail.com (Mark Davis)
Injection-Date: Fri, 14 Aug 2020 06:50:04 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 16
X-Received-Bytes: 2081
X-Received-Body-CRC: 4240939825
View all headers
John,

As you described, the process is pretty much the same when it comes to ReStore and MySQL. I downloaded the 32 ODBC driver and was able to populate the mysql database with all 62 classes from Dolphin. Transactions are working fine as well; no problems whatsoever.

Just downloaded Dolphin 7 and I look forward to using it with the new version of ReStore in the near future. I had a few (unfounded) concerns as I had always used ReStore with MS Access. ReStore comes through like a champ for MySQL. Awesome framework; glad to have it available for Dolphin.

Thanks for the assistance John, most appreciated.

Best Regards,

Mark


1
rocksolid light 0.7.2
clearneti2ptor