Highlighted
Absent Member.
Absent Member.
1546 views

Database connection in Visual Cobol

Jump to solution

I upgraded to the latest version of Visual Cobol and my data connection no longer works. Has something changed with how I connect? I tried removing and then adding back the catalog using the ADO.Net connection editor and it still does not work. I test the connection from the connection editor and it connects successfully.  Iget the following error in the program "A network-related or instance-specific error occurred while establishi". Any ideas on what may be wrong?

 

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

Did you create the ADO connection using the correct bitism of 32-bit or 64-bit?

If your application is built as target x86 then you need to use a 32-bit ADO connection, if it is x64 then it needs to be a 64-bit ADO connection.

ADO connections do not currently work in projects whose target is anyCPU.

For a test please create a brand new connection with a different name and see if that works.

Thanks.

View solution in original post

0 Likes
4 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Hi David,

When exactly do you get that error and how is it returned, on EXEC SQL CONNECT, in sqlerrmc?

Thanks.

0 Likes
Highlighted
Absent Member.
Absent Member.

Hi Chris

It says that the connection can not be found. I tried un-caterloging it and redoing it but it still can not found the connection. It worked prior to updating to 2.2 and rebuilding. Any ideas?

Thanks

David

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Did you create the ADO connection using the correct bitism of 32-bit or 64-bit?

If your application is built as target x86 then you need to use a 32-bit ADO connection, if it is x64 then it needs to be a 64-bit ADO connection.

ADO connections do not currently work in projects whose target is anyCPU.

For a test please create a brand new connection with a different name and see if that works.

Thanks.

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

Thanks Chris

Changing it to 64-bit worked. I would never had thought about doing that since it has been working before I upgraded to Visual Cobol 2.2.

Thanks again.

David

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.