Author Topic: ODBC VX-Rexx/DBExpert  (Read 685 times)

Per E. Johannessen

  • Full Member
  • ***
  • Thank You
  • -Given: 4
  • -Receive: 1
  • Posts: 164
  • Karma: +0/-0
    • View Profile
ODBC VX-Rexx/DBExpert
« on: November 12, 2020, 01:32:42 pm »
Does anyone have experience using the dBase IV/ODBC driver that is bundled with DBExpert under VX-Rexx?
Simple queries work fine from VX-Rexx, but when I try SQL commands like 'INNER JOIN' and 'AS' I get various errors.
Even if I create the SQL in DBExpert, where it runs perfectly, using exactly the same sql-query in VX-Rexx results in errors.

Andreas Schnellbacher

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 32
  • Posts: 592
  • Karma: +1/-0
    • View Profile
Re: ODBC VX-Rexx/DBExpert
« Reply #1 on: November 12, 2020, 05:31:54 pm »
I don't have experience with this VX-REXX extension, but for me Mark Hessling's REXX/SQL package has always worked.

Per E. Johannessen

  • Full Member
  • ***
  • Thank You
  • -Given: 4
  • -Receive: 1
  • Posts: 164
  • Karma: +0/-0
    • View Profile
Re: ODBC VX-Rexx/DBExpert
« Reply #2 on: November 13, 2020, 03:47:04 pm »
Had a look at RexxSQL but it seems that it needs an ODBC driver for connecting to the dBase files and I only have the drivers and manager
that were supplied with DBExpert. Suspect that these drivers are somehow modified to fully work with DBE only.

Does anyone know where I can obtain fully working ODBC drivers ?

Dariusz Piatkowski

  • Hero Member
  • *****
  • Thank You
  • -Given: 14
  • -Receive: 20
  • Posts: 821
  • Karma: +4/-0
    • View Profile
Re: ODBC VX-Rexx/DBExpert
« Reply #3 on: November 13, 2020, 06:06:33 pm »
Hi Per,

...Does anyone know where I can obtain fully working ODBC drivers ?

This probably isn't the answer you are looking for, but G:\OS2\APPS\BIN\ODBCADM.EXE appears to be an ODBC Administration utility. On my machine it does nothing, simply because no such connections are defined. Beyond this though, I wonder if some of the database packaged may in fact contain such drivers?

Per E. Johannessen

  • Full Member
  • ***
  • Thank You
  • -Given: 4
  • -Receive: 1
  • Posts: 164
  • Karma: +0/-0
    • View Profile
Re: ODBC VX-Rexx/DBExpert
« Reply #4 on: November 13, 2020, 06:38:12 pm »
I don't have ODBCADM.EXE in os2\apps\bin, however the one I use is \dbexpert\odbcadm.exe and it works ok.
Think the problem is with the odbc.dll so it would be nice to find out what SQL commands it supports, and/or find out what's blocking
VX-Rexx from using all the functions.

You mentioned that your odbcadm.exe does nothing. Doesn't it even bring up the dialog window where you can define databases etc.?

Dariusz Piatkowski

  • Hero Member
  • *****
  • Thank You
  • -Given: 14
  • -Receive: 20
  • Posts: 821
  • Karma: +4/-0
    • View Profile
Re: ODBC VX-Rexx/DBExpert
« Reply #5 on: November 13, 2020, 10:57:28 pm »
...You mentioned that your odbcadm.exe does nothing. Doesn't it even bring up the dialog window where you can define databases etc.?

Well, I have nothing populated in the window and when I select 'Drivers' button that 'Installed ODBC Drivers' pop-up is empty as well, and there is no ability to add anything there. Further on, none of the other buttons work, so selecting HELP does not actually bring up any help screen. Therefore, I suspect that my install is only paritially correctly installed. Quite honestly I have no idea how it got here in the first place...lol

Per E. Johannessen

  • Full Member
  • ***
  • Thank You
  • -Given: 4
  • -Receive: 1
  • Posts: 164
  • Karma: +0/-0
    • View Profile
Re: ODBC VX-Rexx/DBExpert
« Reply #6 on: November 14, 2020, 05:55:55 pm »
Here is an example of an error I get when running the SQL statement with VX-Rexx.
(The same SQL statement produces the expected result and no errors with DBExpert.)



Dariusz Piatkowski

  • Hero Member
  • *****
  • Thank You
  • -Given: 14
  • -Receive: 20
  • Posts: 821
  • Karma: +4/-0
    • View Profile
Re: ODBC VX-Rexx/DBExpert
« Reply #7 on: November 14, 2020, 07:05:52 pm »
It looks like it's flat-out not expecting to see the JOIN in the first place...that feels like a syntax parsing error.

I spent a few years writing Oracle database code, so I'm curious if with this SQL dialect you could skip the 'INNER JOIN' and just go right to WHERE clause and rely on implicit JOIN given the matching of foreign and primary keys?

Per E. Johannessen

  • Full Member
  • ***
  • Thank You
  • -Given: 4
  • -Receive: 1
  • Posts: 164
  • Karma: +0/-0
    • View Profile
Re: ODBC VX-Rexx/DBExpert
« Reply #8 on: November 15, 2020, 12:19:26 am »
Yes, can do without 'INNER JOIN' in this case, but this was just an example to trigger the error.
Most queries in this project are quite simple, however I a need a few that involves up to four tables and several joins.

Have tried to find the actual syntax/code VX-Rexx creates by searching the various sections involved but no luck so far.

Per E. Johannessen

  • Full Member
  • ***
  • Thank You
  • -Given: 4
  • -Receive: 1
  • Posts: 164
  • Karma: +0/-0
    • View Profile
Re: ODBC VX-Rexx/DBExpert
« Reply #9 on: November 16, 2020, 04:23:35 pm »
Found the SQL statement in a file named window1.vry and it is identical to the one produced by DBExpert.

Does anyone happen to have Watcom SQL?
Believe that one is doing well with VX-Rexx so I'd like to try it if it was available anywhere.

Jan-Erik Lärka

  • Global Moderator
  • Full Member
  • *****
  • Thank You
  • -Given: 8
  • -Receive: 15
  • Posts: 203
  • Karma: +0/-0
    • View Profile
Re: ODBC VX-Rexx/DBExpert
« Reply #10 on: November 22, 2020, 10:13:26 am »
The drivers shipped with DBExpert can only be used with DBExpert.
You may want to install Lotus SmartSuite for OS/2 or UNIXODBC for OS/2 use ODBC with another product.

I've begun to figure out how to write a bridge between rexx and java, but stumbled on some problems. It would be quite useful if we'd get a bridge between jdbc and odbc as there are plenty of current drivers for java.

//Jan-Erik

Per E. Johannessen

  • Full Member
  • ***
  • Thank You
  • -Given: 4
  • -Receive: 1
  • Posts: 164
  • Karma: +0/-0
    • View Profile
Re: ODBC VX-Rexx/DBExpert
« Reply #11 on: November 22, 2020, 02:43:20 pm »
For simple SQL statements the DBE drivers do work with VX-Rexx, using JOIN or AS in queries fail.

Did try UNIXODBC quite some time ago but had some trouble with that package also.
At that time I also tried SmartSuite's odbc driver (Intersolv?) and it keeps displaying a popup window
when used with other programs.

UNIXODBC looks promising so a more recent port would be nice.
Unfortunately I don't have the skills to do that.

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 11
  • -Receive: 195
  • Posts: 2720
  • Karma: +16/-0
    • View Profile
Re: ODBC VX-Rexx/DBExpert
« Reply #12 on: November 22, 2020, 09:05:01 pm »
UNIXODBC looks promising so a more recent port would be nice.
Unfortunately I don't have the skills to do that.

I took a quick look and try. The good news is that the OS/2 related stuff seems to be all there, but who knows if more is needed. The bad news is that rebuilding the autotools stuff fails. There's a problem with libtool, the complex script that creates the DLLs and often the executables. It uses ltdl to dynamically load the DLLs and that part doesn't want to install/work. ltdl has seldom worked correctly in my experience and the usual workaround is to just directly use DosLoadModule(). I don't know anything about the program so not really prepared to go forward. I see things in the readmes about stuff like various drivers that support more or less functionality and different ones are better on different systems. So really it needs someone who knows how it should work to compile and test.
There's also now a QT frontend as well.

Pete2

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: ODBC VX-Rexx/DBExpert
« Reply #13 on: November 22, 2020, 11:57:28 pm »
Is Ko Myung-Hun's build of libtool any help? (My build environment hasn't worked for several years so I'm well off the pace here.)

Per E. Johannessen

  • Full Member
  • ***
  • Thank You
  • -Given: 4
  • -Receive: 1
  • Posts: 164
  • Karma: +0/-0
    • View Profile
Re: ODBC VX-Rexx/DBExpert
« Reply #14 on: November 25, 2020, 09:41:19 pm »
Hi Dave,

To get an idea of how unixODBC works I think it's best to install the old version:

https://hobbes.nmsu.edu/?detail=%2Fpub%2Fos2%2Fapps%2Fdatabase%2Funixodbc010.zip

Long ago I had it installed but had some problems with the odbc driver. Don't remember exactly what the problem was so I'll install it again when I've set up a "test system".