Menu

tester.cmd error, RX/SQLwith MySQL 5.5.16

Help
mahesh
2011-12-12
2013-04-25
  • mahesh

    mahesh - 2011-12-12

    Hi experts, I am trying to use Rx/SQL + OORexx on MySQL 5.5.16 on a Windows 7 machine. I am able to run the simple.cmd successfully which verifies the MySQL connection. However when I tried running the tester.cmd suppled with RX/SQL I am getting the following error:

    D:\Installs\rxsql>rexx tester.cmd setup
    rexxsql 2.6B3 23 May 2011 WIN32 MySQL with: REXX-ooRexx_4.1.0(MT) 6.03 5 Dec 2010
    ***** Running test: setup *****
    connect: succeeded for <c1> <> <> <> <>
    Error in setdatatypes: unable to determine datatype for CHAR. Datatype is: CHARACTER(30)
    SQLCODE: -1
    SQLERRM: No database selected
    SQLTEXT: create table RX_TEST( col1 CHAR(30) )
    SQLSTATE: ZZZZZ

    Please help.

    Are there any solution other than Rx/SQL for accessing DBMS from REXX?

    Thanks in advance.
    Mahesh

     
  • Mark Hessling

    Mark Hessling - 2011-12-13

    mySQL requires a database to be specified in the call to sqlconnect(). As indicated above in the output:
    connect: succeeded for <c1> <> <> <> <>
    the parameters to sqlconnect() are all empty.
    In your separate email you show your BAT file for running tester.cmd is:
    Hi Mark,

    I am trying to use Rx/SQL2.6 + OORexx 4.1 with MySQL 5.5.16 on a Windows 7 machine.

    I am able to run the simple.cmd successfully which verifies the MySQL connection.

    However, when I tried running the tester.cmd supplied with RX/SQL I am getting the following error:

    D:\Installs\rxsql>rexx tester.cmd setup rexxsql 2.6B3 23 May 2011 WIN32 MySQL with: REXX-ooRexx_4.1.0(MT) 6.03 5 Dec 2010

    ***** Running test: setup *****

    connect: succeeded for <c1> <> <> <> <>

    Error in setdatatypes: unable to determine datatype for CHAR. Datatype is: CHARACTER(30)

    SQLCODE: -1

    SQLERRM: No database selected

    SQLTEXT: create table RX_TEST( col1 CHAR(30) )

    SQLSTATE: ZZZZZ

    Please help. My batch file for executing the tester.cmd is as follows

    set REXXSQL_USERNAME = "root"
    set REXXSQL_PASSWORD = "root"
    set REXXSQL_DATABASE = "mySQL"
    set REXXSQL_SERVER   = "localhost"
    rexx tester.cmd setup

    Now the above BAT file will work fine if you are using 4NT as your command processor. (That's what I use and couldn't work out why it failed for you). So I reran the above BAT file with cmd.exe, and sure enough the SET commands fail.

    If you change your BAT file to:
    set REXXSQL_USERNAME=root
    set REXXSQL_PASSWORD=root
    set REXXSQL_DATABASE=mySQL
    set REXXSQL_SERVER=localhost
    rexx tester.cmd setup

    It should work.  Remove the spaces before and after the = signs. I also removed the quotes, but they will still probably work.

    So this is a BAT problem, not a Rexx/SQL problem :-)

    And no, there are no other solutions to accessing mySQL from Rexx other than Rexx/SQL AFAIK.

    Cheers, Mark

     

Log in to post a comment.