Which Database Driver for a small install?

The Jet db is a bit of a hybrid. It’s a little like SQLite. The access jet engine provides a limited SQL to be used, but it has all the same oplock problems as TPS.
If theres going to have to be a conversion take plac, Utilities exist such that it doesn’t really matter which DB you go to.

1 Like

Hi,

I uploaded a clw Firebird ABC app. It’s very easy.

Look at

1 Like

If you don’t like sql, then tps is a good solution. Compared to dat, tps have fast transactions. We use tps in terminal mode. There are various terminal solutions, for example, tsplus. It works quickly and reliably. If you are concerned about the 2GB tps limit, then you can very easily remove it by switching to action zen (btrieve). When we needed this, we just added file{prop:driver}=‘btrieve’ in the templates and generated a conversion program. Practically no changes have been made to the app. One application can work with tps and btrieve, defining the type of database at startup. Prop:driver requires a DFD driver.

1 Like

I’m using MariaDB for our applications, including NetTalk and AnyScreen. So far, the performance is great.

1 Like

Okay… Let’s say I use MariaDB as my SQL. It’s been six years since I have touched Clarion so I am very rusty. I did use MSSQL in my business for my Internet Data.

I know this won’t compile, since I am just cranking out some hand-coded, code for your review:

Pet FILE,DRIVER('ODBC','/AUTOINC=SELECT LAST_INSERT_ID()'),
OWNER('MariaDB,root'),NAME('pet'),PRE(pet),BINDABLE,THREAD
Primary KEY(pet:PetID),PRIMARY

  Record RECORD,PRE()
PetID       LONG !Server side auto inc
PetName     CSTRING(21)
  END
END

GCONN               STRING(255)

  CODE
  GCONN = 'MariaDB; DATABASE=Pet; UID=SA; PWD=12345678;' !MSSQL CONNECTION
  Pet{PROP:OWNER} = CLIP(GCONN)
  SHARE(PET)

How do I create the connection string (with User and Password) for MariaDB? The Clarion help text has always been piss-poor when it comes to giving examples for the different SQL Database Driver connection strings.

Worry not: I know better than hard-coding the user/pass into the code. I will use a workstation environment variable instead.

Hi,

Firstly I haven’t used MariaDB, however if you have a 32bit ODBC driver installed, then I would expect the connection string to look something like this

MyConnectionString STRING('Driver={{MariaDB ODBC 3.2 Driver};' & 
                          'Server=localhost;' & |
                          'Database=mydatabase;' & |
                          'User=myusername;' & |
                          'Password=mypassword;' & |
                          'Port=3306;')

For some reason Discourse changes the pipe character in code formatting, so / is a pipe( | ) character. More parameters seem to be explained here

Mark

1 Like

Thanks for that, Mark!

Once I get MariaDB install on a second computer I’ll be back here with further questions if FILEERRORCODE() errors out on connections. The rest of the calls are a “piece of cake”.

Hi Robert,
Supported MariaDB ODBC Connector version: 3.1.xx and above
(Currently I use version 3.1.15)

Example Connection String:
glo:sqlconnect = 'DRIVER=MariaDB ODBC 3.1 Driver;SERVER=your_server_ip; PORT=3306;DATABASE=hrissuite;USER=your_userID;PWD=your_password;AUTO_RECONNECT=1;'

the AUTO_RECONNECT=1 is optional

using ODBC, you can choose the database your client want

1 Like

Robert,

Softvelocity IP Server is reliable solution for
TPS files over network…

regards,
Petar

2 Likes

Additional issues arise with windows network file caching where users can read/write in local caches instead of using a common file. This had to be turned off in the register TCP settings somewhere.
The client was not willing to do that for all users/workstations - so we continued to move everything to SQL.