Highlighted
Absent Member.
Absent Member.
807 views

ODBC Drivers, Windows Eclipse, and DevHub to Linux Connection Error

Jump to solution

I'm using Visual Cobol to access a MySQL Database.

 

I have the $SET SQL(DBMAN=ODBC) set, and I've even tried setting that in the Microfocus > Build Configurations > COBOL > SQL Preprocessor.

 

However the compiled executable from Visual Cobol, gives me the following error.

 

          OpenESQL Error: Unable to load ODBC Driver/Driver Manager. Ensure that your
     database environment is set correctly.

 

However if I compile from the Linux command line using "cob -xV Source.cbl" the executable works perfectly.

 

Its just a convenience thing, but any ideas how to get Eclipse to compile executable programs without resorting to me going to the command line every time?

 

Thanks for you help.

 

 

Eric Boatman

0 Likes
2 Solutions

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: ODBC Drivers, Windows Eclipse, and DevHub to Linux Connection Error

Jump to solution

Hi Eric,

One possible reason for this would be a disagreement between the bitism (32 vs 64) of your installed ODBC middleware, and that of the executable file you create.

At the command line, you can check your COBOL working mode (which determines the bitism of the executable you create) with the command:
cobmode

The output should be a message similar to the following(showing 32 or 64 instead of XX):
Effective Default Working Mode: XX bit

Once you've determined this, check whether Eclipse is configured to build executables using the same bitism. This is configured within Project Properties, in the Micro Focus->Build Configurations->COBOL dialog, with the setting "Platform Target". Is there any chance that the bitism you build in Eclipse is different than what you build at the command line?

Blair McDonald

View solution in original post

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: ODBC Drivers, Windows Eclipse, and DevHub to Linux Connection Error

Jump to solution
Hi Eric,

You can change the default for future Native COBOL projects that are created in Visual COBOL for Eclipse by going to Window->Preferences->Micro Focus->Builder. See the entry Default Platform Target.

Future regret is difficult to predict 🙂 You can always modify the setting for individual projects in Project Properties as needed.

Blair McDonald

View solution in original post

0 Likes
3 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: ODBC Drivers, Windows Eclipse, and DevHub to Linux Connection Error

Jump to solution

Hi Eric,

One possible reason for this would be a disagreement between the bitism (32 vs 64) of your installed ODBC middleware, and that of the executable file you create.

At the command line, you can check your COBOL working mode (which determines the bitism of the executable you create) with the command:
cobmode

The output should be a message similar to the following(showing 32 or 64 instead of XX):
Effective Default Working Mode: XX bit

Once you've determined this, check whether Eclipse is configured to build executables using the same bitism. This is configured within Project Properties, in the Micro Focus->Build Configurations->COBOL dialog, with the setting "Platform Target". Is there any chance that the bitism you build in Eclipse is different than what you build at the command line?

Blair McDonald

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: ODBC Drivers, Windows Eclipse, and DevHub to Linux Connection Error

Jump to solution
Thats exactly it ... Today, you are my hero ...

Is there an easy way to default this to 64Bit with Eclipse? And am I going to regret this later?
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: ODBC Drivers, Windows Eclipse, and DevHub to Linux Connection Error

Jump to solution
Hi Eric,

You can change the default for future Native COBOL projects that are created in Visual COBOL for Eclipse by going to Window->Preferences->Micro Focus->Builder. See the entry Default Platform Target.

Future regret is difficult to predict 🙂 You can always modify the setting for individual projects in Project Properties as needed.

Blair McDonald

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.