Home > Archive > Cobol > March 2005 > SQL + MF NetExpress: sqresus.dll
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
SQL + MF NetExpress: sqresus.dll
|
|
| Michael Russell 2005-03-13, 3:55 pm |
| Hi All,
Having just rebuilt (Win XP SP2), reinstalled Oracle 9i, MF NetExpress,
I now have a problem ..
(no surprise there!) ...
Running my app through Animator, it connects to the Oracle data-base ok
- at least, sqlcode is 0.
On the 2nd SQL statement to execute, a message box with 'Oracle ODBC
driver' in the title bar
declares 'Cannot load resource file sqresus.dll'.
I'd set up a System DSN using driver 'Oracle in OraDb9i_home1' ...
I've also set up a User DSN with same driver, in case it would help
....... it didn't.
Of course, sqresus.dll is in c:\Oracle91\bin & that's in the path, too,
as shown via 'My Computer' / properties / environment variables.
I've also tried running NetExpress in Administrator mode - no go.
Also tried Microsoft's Oracle driver - no error message, but it just hung.
Needless to say, it used to work using Oracle 9i ... :-)
I can't remember which driver I used to use: I'd have guessed
it was a Microfocus one, but there's no Microfocus Oracle driver listed.
Any ideas?
Regards
Michael
| |
| James J. Gavan 2005-03-13, 3:55 pm |
| Michael Russell wrote:
Michael,
Your query is M/F specific - sign up here :-
http://www.cobolportal.com/microfoc...m/agreement.asp
List your query under Net Express and use the magic "SQL" in your
subject title. There are several M/F people who could help you - but
Barb specializes in DB queries so she will probably jump in.
Jimmy, Calgary AB
| |
| Michael Russell 2005-03-13, 8:55 pm |
| Thanks, James; I've done just that.
You're right, this isn't really a 'Cobol' question - still, I've had a
good answer! :-)
Regards
Michael
James J. Gavan wrote:
> Michael Russell wrote:
>
> Michael,
>
> Your query is M/F specific - sign up here :-
>
> http://www.cobolportal.com/microfoc...m/agreement.asp
>
> List your query under Net Express and use the magic "SQL" in your
> subject title. There are several M/F people who could help you - but
> Barb specializes in DB queries so she will probably jump in.
>
> Jimmy, Calgary AB
| |
| Robert Wagner 2005-03-13, 8:55 pm |
| On Sun, 13 Mar 2005 15:31:21 +0000, Michael Russell
<Michael.Russell@msn.com> wrote:
>Hi All,
>
>Having just rebuilt (Win XP SP2), reinstalled Oracle 9i, MF NetExpress,
>I now have a problem ..
>(no surprise there!) ...
>
>Running my app through Animator, it connects to the Oracle data-base ok
>- at least, sqlcode is 0.
>On the 2nd SQL statement to execute, a message box with 'Oracle ODBC
>driver' in the title bar
>declares 'Cannot load resource file sqresus.dll'.
>
>I'd set up a System DSN using driver 'Oracle in OraDb9i_home1' ...
>I've also set up a User DSN with same driver, in case it would help
>...... it didn't.
>
>Of course, sqresus.dll is in c:\Oracle91\bin & that's in the path, too,
>as shown via 'My Computer' / properties / environment variables.
The directory needs to be in the system path, not the user path. The
system path is at:
HKLM\SYSTEM\CurrentControlSet\Control\Se
ssion Manager\Environment\Path
Does SYSTEM, or better EVERYONE, have execute permission on the dll?
How about the two directories?
Try copying the dll to \winnt\system32. Do you get the same error?
| |
| Michael Russell 2005-03-14, 8:55 am |
| Robert Wagner wrote:
>On Sun, 13 Mar 2005 15:31:21 +0000, Michael Russell
><Michael.Russell@msn.com> wrote:
>
>
>
>
>The directory needs to be in the system path, not the user path. The
>system path is at:
> HKLM\SYSTEM\CurrentControlSet\Control\Se
ssion Manager\Environment\Path
>
>Does SYSTEM, or better EVERYONE, have execute permission on the dll?
>How about the two directories?
>
>Try copying the dll to \winnt\system32. Do you get the same error?
>
>
>
>
Hi Robert,
(Firstly, a correction: the thing fails at the 'connect' & gets no further.)
Well, surprisingly, the directory _is_ in the system path - I guess
altering Path via 'My Computer'
actually propagates it into that registry item you quoted above ...?
Yes, I tried copying it into various likely-sounding directories, but no
luck.
As to permissions, the directory is marked read-only. I'm not sure how
to check/set
permissions in WinXP ... but since I have Admin rights, my apps should
be ok?
(bad, I know, for any user to have Admin rights; just noticed it;
haven't re-set myself
back down since recent re-build of system)
Regards
Michael
| |
| Simon Tobias 2005-03-14, 3:55 pm |
| Hi Michael,
When you reinstalled Oracle, did you install in the same directory as your
previous installation? If not, then it's *possible* that you may have a
rogue registry or .INI file entry pointing to your old installation
directory still.
Are you able to communicate with the server specified within the ODBC DSN
configuration using Oracle's tnsping utility? If not, I'd check your
%ORACLE_HOME%\network\admin\tnsnames.ora file to ensure that its' entries
are correct.
From with the ODBC Administrator tool, are you able to use the 'Test
Connection' option within the configuration of your DSN to connect to the
database (note this will fail if the above test fails)? If not, the Net
Express would not be able to connect either.
SimonT.
| |
| Michael Russell 2005-03-14, 3:55 pm |
| Simon Tobias wrote:
>Hi Michael,
>
>When you reinstalled Oracle, did you install in the same directory as your
>previous installation? If not, then it's *possible* that you may have a
>rogue registry or .INI file entry pointing to your old installation
>directory still.
>
>Are you able to communicate with the server specified within the ODBC DSN
>configuration using Oracle's tnsping utility? If not, I'd check your
>%ORACLE_HOME%\network\admin\tnsnames.ora file to ensure that its' entries
>are correct.
>
>From with the ODBC Administrator tool, are you able to use the 'Test
>Connection' option within the configuration of your DSN to connect to the
>database (note this will fail if the above test fails)? If not, the Net
>Express would not be able to connect either.
>
>SimonT.
>
>
>
>
Hi Simon,
Thanks for the answer ...
I'll explain a little more:
I bought another, larger disk; set it as my new C drive (not easy in
Windows!) & installed
Win XP, Oracle 9i & Net Express. So, all these are full, clean installs.
My old C drive is still connected (as D), so I can go checking old settings
- well, at least, where files were or what they contained.
Oracle's tnsping? just tried it & it's fine.
ODBC's test connection works too.
I've just now run an Excel query to load data via this ODBC entry -
works ok, no problem encountered.
Thanks for your interest - continuing, I hope! :-)
Michael
| |
| Michael Russell 2005-03-14, 3:55 pm |
| Michael Russell wrote:
> Simon Tobias wrote:
>
> Hi Simon,
>
> Thanks for the answer ...
> I'll explain a little more:
> I bought another, larger disk; set it as my new C drive (not easy in
> Windows!) & installed
> Win XP, Oracle 9i & Net Express. So, all these are full, clean installs.
> My old C drive is still connected (as D), so I can go checking old
> settings
> - well, at least, where files were or what they contained.
>
> Oracle's tnsping? just tried it & it's fine.
> ODBC's test connection works too.
> I've just now run an Excel query to load data via this ODBC entry -
> works ok, no problem encountered.
>
> Thanks for your interest - continuing, I hope! :-)
>
> Michael
Simon,
btw, in the ESQL Assistant, when it lists the data sources,
you have the option to right-click & see its properties.
(click the pic of a disk)
When I did, the following message-box appeared:
message box title-bar: Unexpected Error
C0000005 Access Violation at 74324150 01:00003150
c:\windows\system32\ODBC32.dll
I clicked 'exit' ...
Next message-box:
title-bar: MFNETX
Execution error : file 'MFSQLY02'
error code: 114, pc=0, call=1, seg=0
114 Attempt to access item beyond bounds of memory (Signal 11)
hope that helps
Michael
| |
| Robert Wagner 2005-03-14, 3:55 pm |
| On Mon, 14 Mar 2005 11:37:51 +0000, Michael Russell
<Michael.Russell@msn.com> wrote:
>Robert Wagner wrote:
>
>Hi Robert,
>
>(Firstly, a correction: the thing fails at the 'connect' & gets no further.)
In that case, it might be a TNS problem.
>Well, surprisingly, the directory _is_ in the system path - I guess
>altering Path via 'My Computer'
>actually propagates it into that registry item you quoted above ...?
Yes, it does.
>Yes, I tried copying it into various likely-sounding directories, but no
>luck.
>
>As to permissions, the directory is marked read-only. I'm not sure how
>to check/set
>permissions in WinXP ... but since I have Admin rights, my apps should
>be ok?
Services such as ODBC run under userid SYSTEM, not under your userid.
To be safe, grant Read & Execute to Everyone. Logged on as Admin,
select Add and type Everyone.
| |
| James J. Gavan 2005-03-14, 3:55 pm |
| Michael Russell wrote:
>
> When I did, the following message-box appeared:
>
> message box title-bar: Unexpected Error
> C0000005 Access Violation at 74324150 01:00003150
> c:\windows\system32\ODBC32.dll
> I clicked 'exit' ...
>
> Next message-box:
> title-bar: MFNETX
> Execution error : file 'MFSQLY02'
> error code: 114, pc=0, call=1, seg=0
> 114 Attempt to access item beyond bounds of memory (Signal 11)
Michael,
Not the answer to your DB query. Sometimes when things go wrong, that
second message follows automatically. Just forget it. Your error is
really from the first message.
Jimmy
| |
| Simon Tobias 2005-03-14, 8:55 pm |
| Hi Michael,
I've posted further questions on the cobolportalforum -- see you over
there...
SimonT.
| |
| Michael Russell 2005-03-15, 3:55 pm |
| Robert Wagner wrote:
>On Mon, 14 Mar 2005 11:37:51 +0000, Michael Russell
><Michael.Russell@msn.com> wrote:
>
>
>
>
>In that case, it might be a TNS problem.
>
>
>
>
>Yes, it does.
>
>
>
>
>Services such as ODBC run under userid SYSTEM, not under your userid.
>To be safe, grant Read & Execute to Everyone. Logged on as Admin,
>select Add and type Everyone.
>
>
>
Hi Robert
I'm not sure what the target of the granting of Read & Execute is.
Could you enlighten me, please?
Regards
Michael
| |
| Michael Russell 2005-03-15, 3:55 pm |
| Simon,
Here's the output of an ODBC trace up to the error message - the only
action by now is an attempt to 'connect':
('Decs' is the name of the first .int, unless it's just coincidence)
I hope it helps - as I'm currently getting nowhere slowly!
Decs 378-ec ENTER SQLAllocEnv
HENV * 003DBC6C
Decs 378-ec EXIT SQLAllocEnv with return code 0
(SQL_SUCCESS)
HENV * 0x003DBC6C ( 0x00bb1690)
Decs 378-ec ENTER SQLAllocConnect
HENV 00BB1690
HDBC * 0012E95C
Decs 378-ec EXIT SQLAllocConnect with return code 0
(SQL_SUCCESS)
HENV 00BB1690
HDBC * 0x0012E95C ( 0x00bb1758)
Decs 378-ec ENTER SQLSetConnectAttr
SQLHDBC 00BB1758
SQLINTEGER 1041 <unknown>
SQLPOINTER [Unknown attribute 1041]
SQLINTEGER -3
Decs 378-ec EXIT SQLSetConnectAttr with return code 0
(SQL_SUCCESS)
SQLHDBC 00BB1758
SQLINTEGER 1041 <unknown>
SQLPOINTER [Unknown attribute 1041]
SQLINTEGER -3
Decs 378-ec ENTER SQLSetConnectAttr
SQLHDBC 00BB1758
SQLINTEGER 1042 <unknown>
SQLPOINTER [Unknown attribute 1042]
SQLINTEGER -3
Decs 378-ec EXIT SQLSetConnectAttr with return code 0
(SQL_SUCCESS)
SQLHDBC 00BB1758
SQLINTEGER 1042 <unknown>
SQLPOINTER [Unknown attribute 1042]
SQLINTEGER -3
Decs 378-ec ENTER SQLSetConnectOption
HDBC 00BB1758
SQLINTEGER 110 <SQL_ODBC_CURSORS>
SQLPOINTER 0x00000000
Decs 378-ec EXIT SQLSetConnectOption with return code 0
(SQL_SUCCESS)
HDBC 00BB1758
SQLINTEGER 110 <SQL_ODBC_CURSORS>
SQLPOINTER 0x00000000
Decs 378-ec ENTER SQLDriverConnectW
HDBC 00BB1758
HWND 00010014
WCHAR * 0x74329A38 [ -3] "******\ 0"
SWORD -3
WCHAR * 0x74329A38
SWORD 2
SWORD * 0x00000000
UWORD 0 <SQL_DRIVER_NOPROMPT>
Decs da8-834 ENTER SQLAllocEnv
HENV * 003DBC6C
Decs da8-834 EXIT SQLAllocEnv with return code 0
(SQL_SUCCESS)
HENV * 0x003DBC6C ( 0x00bb1690)
Decs da8-834 ENTER SQLAllocConnect
HENV 00BB1690
HDBC * 0012E95C
Decs da8-834 EXIT SQLAllocConnect with return code 0
(SQL_SUCCESS)
HENV 00BB1690
HDBC * 0x0012E95C ( 0x00bb1758)
Decs da8-834 ENTER SQLSetConnectAttr
SQLHDBC 00BB1758
SQLINTEGER 1041 <unknown>
SQLPOINTER [Unknown attribute 1041]
SQLINTEGER -3
Decs da8-834 EXIT SQLSetConnectAttr with return code 0
(SQL_SUCCESS)
SQLHDBC 00BB1758
SQLINTEGER 1041 <unknown>
SQLPOINTER [Unknown attribute 1041]
SQLINTEGER -3
Decs da8-834 ENTER SQLSetConnectAttr
SQLHDBC 00BB1758
SQLINTEGER 1042 <unknown>
SQLPOINTER [Unknown attribute 1042]
SQLINTEGER -3
Decs da8-834 EXIT SQLSetConnectAttr with return code 0
(SQL_SUCCESS)
SQLHDBC 00BB1758
SQLINTEGER 1042 <unknown>
SQLPOINTER [Unknown attribute 1042]
SQLINTEGER -3
Decs da8-834 ENTER SQLSetConnectOption
HDBC 00BB1758
SQLINTEGER 110 <SQL_ODBC_CURSORS>
SQLPOINTER 0x00000000
Decs da8-834 EXIT SQLSetConnectOption with return code 0
(SQL_SUCCESS)
HDBC 00BB1758
SQLINTEGER 110 <SQL_ODBC_CURSORS>
SQLPOINTER 0x00000000
Decs da8-834 ENTER SQLDriverConnectW
HDBC 00BB1758
HWND 00010014
WCHAR * 0x74329A38 [ -3] "******\ 0"
SWORD -3
WCHAR * 0x74329A38
SWORD 2
SWORD * 0x00000000
UWORD 0 <SQL_DRIVER_NOPROMPT>
Decs da8-834 EXIT SQLDriverConnectW with return code -1
(SQL_ERROR)
HDBC 00BB1758
HWND 00010014
WCHAR * 0x74329A38 [ -3] "******\ 0"
SWORD -3
WCHAR * 0x74329A38
SWORD 2
SWORD * 0x00000000
UWORD 0 <SQL_DRIVER_NOPROMPT>
DIAG [IM003] Specified driver could not be loaded due to system
error 1114 (Oracle in OraDb9i_home1). (160)
Decs da8-834 ENTER SQLErrorW
HENV 00BB1690
HDBC 00BB1758
HSTMT 00000000
WCHAR * 0x0012E7E4 (NYI)
SDWORD * 0x0012E824
WCHAR * 0x0012E3E4
SWORD 512
SWORD * 0x0012E82C
Decs da8-834 EXIT SQLErrorW with return code 0 (SQL_SUCCESS)
HENV 00BB1690
HDBC 00BB1758
HSTMT 00000000
WCHAR * 0x0012E7E4 (NYI)
SDWORD * 0x0012E824 (160)
WCHAR * 0x0012E3E4 [ 89] "Specified driver
could not be loaded due to system error 1114 (Oracle in OraDb9i_home1)."
SWORD 512
SWORD * 0x0012E82C (89)
| |
| James J. Gavan 2005-03-15, 8:55 pm |
| Michael Russell wrote:
> Simon,
>
> Here's the output of an ODBC trace up to the error message - the only
> action by now is an attempt to 'connect':
> ('Decs' is the name of the first .int, unless it's just coincidence)
> I hope it helps - as I'm currently getting nowhere slowly!
You may safely assume that as a complete novice to SQL my advance would
be even slower than yours :-)
Even with all those diagnostics - doesn't help much does it. Still I see
Simon is quizing you via Answer Exchage - between the two of you, you
shuld get there.
Just one thought though - if it doesn't esily become appraent. Have you
looked at the Open ESQL Assistant, (it's there in the IDE from Tools
---->. Could test using that, with a one short program. In fact you can
even run some queries from that tool without compiling COBOL programs.
1. Set up your DB - well that's obvious !
2. register with the ODBC Driver
3. Go into the ESQL Asst which will give you a left pane Treeview of
available DBs, registered with #2 above
4. Select a DB, expand the Treeview and focus on a particular table.
(Haven't done it yet - not realizing it could be done - but you can do
Table joins).
5. Now in Right pane you can use it to initiate SQL Statements.
6. Depending upon what you can/can't do :-
(a) Can run query in ESQL Asst to see if it works
(b) Compile your COBOL program to see if that works
ESQL Asst defaults to SQLERROR - on advice I use SQLSTATE. I've got all
the SQLSTATE errors as literals in one OO class for generating Error
Messageboxes.
OK - so I'm into OO using INVOKE - but could be adpated to CALL for a
Procedural if you were interested. If you would like a copy e-mail me as
above, 'editing' my name.
See detail below - primarily as info for Daniel.
Daniel, recall telling our Korean friend how to handle NULLs. I never
got the hang of those bloody things, even though a couple of people here
tried to put me straight and I spent hours searching through MS Access
for clues.
OK - so I use MS Access together with the M/F ESQL Assistant above. I
really don't have a bloody clue what it's doing with NULLs but this works :-
1. First, from the DB Table, ESQL Assistant generates a copyfile in
three parts :-
*>----------------- descriptions.cpy ---------------------------
EXEC SQL DECLARE
`Descriptions` TABLE
( "DesID" VARCHAR(2)
,"DesCode" VARCHAR(4)
,"DesName" VARCHAR(40)
,"DesOther1" VARCHAR(10)
,"DesOther2" VARCHAR(10)
) END-EXEC.
****************************************
**************************
* COBOL DECLARATION FOR TABLE Descriptions *
****************************************
**************************
*> see desrecrd.cpy.
****************************************
**************************
* COBOL INDICATOR VARIABLES FOR TABLE *
****************************************
**************************
01 DCLDescriptions-NULL.
03 Descriptions-DesID-NULL PIC S9(04) COMP-5.
03 Descriptions-DesCode-NULL PIC S9(04) COMP-5.
03 Descriptions-DesName-NULL PIC S9(04) COMP-5.
03 Descriptions-DesOther1-NULL PIC S9(04) COMP-5.
03 Descriptions-DesOther2-NULL PIC S9(04) COMP-5.
*>---------------------------------------------------------------
I've split out the 'COBOL' format above so that I can use it in other
classes/programs :-
*>-------------------- desrecrd.cpy -----------------------------
(tag1).
07 (tag)-DesPrimeKey.
10 (tag)-DesID PIC X(2).
10 (tag)-DesCode PIC X(4).
07.
10 (tag)-DesName PIC X(40).
10 (tag)-DesOther1 PIC X(10).
10 (tag)-DesOther2 PIC X(10).
*>--------------------------------------------------------------
2. Here's a method referencing the copyfile. To be specific I've marked
the lines generated by ESQL, which I then copied and pasted into the
source :-
*>--------------------------------------------------------------
Method-id. "writeRecord".
*>--------------------------------------------------------------
Linkage section.
copy "desrecrd.cpy" replacing ==(tag1)== by ==01 lnk-record==,
==(tag)== by ==lnk==.
copy "\copylib\sqlResult.cpy" replacing ==(tag)== by ==01 lnk==.
Procedure Division using lnk-Record
returning lnk-SqlResult.
set ResultOK to true
invoke os-SqlConnection "setCurrentConnection"
using ws-dbID returning lnk-SqlResult
if TableError
EXIT METHOD
End-if
move lnk-record to Descriptions-Record
ESQL EXEC SQL
ESQL INSERT INTO `Descriptions`
ESQL (`DesID`
ESQL ,`DesCode`
ESQL ,`DesName`
ESQL ,`DesOther1`
ESQL ,`DesOther2`
ESQL ) VALUES
ESQL (:Descriptions-DesID:Descriptions-DesID-NULL
ESQL ,:Descriptions-DesCode:Descriptions-DesCode-NULL
ESQL ,:Descriptions-DesName:Descriptions-DesName-NULL
ESQL ,:Descriptions-DesOther1:Descriptions-DesOther1-NULL
ESQL ,:Descriptions-DesOther2:Descriptions-DesOther2-NULL
ESQL )
ESQL END-EXEC
Evaluate true
when SQLSTATE = "00000"
EXEC SQL COMMIT END-EXEC
when other
initialize ws-ErrorID
move Descriptions-DesID to ws-ErrorId(1:2)
move Descriptions-DesCode to ws-ErrorId(3:2)
invoke self "setErrorMessage"
set TableError to true
End-evaluate
End Method "writeRecord".
*>--------------------------------------------------------------
| |
| Simon Tobias 2005-03-17, 8:55 pm |
| > Just one thought though - if it doesn't esily become appraent. Have you
> looked at the Open ESQL Assistant, (it's there in the IDE from
> Tools ---->. Could test using that, with a one short program. In fact you
> can even run some queries from that tool without compiling COBOL programs.
Hi Jimmy,
Michael had tried using the ESQL Assistant earlier, and had hit an error:
---- start of quote ----
btw, in the ESQL Assistant, when it lists the data sources,
you have the option to right-click & see its properties.
(click the pic of a disk)
When I did, the following message-box appeared:
message box title-bar: Unexpected Error
C0000005 Access Violation at 74324150 01:00003150
c:\windows\system32\ODBC32.dll
I clicked 'exit' ...
Next message-box:
title-bar: MFNETX
Execution error : file 'MFSQLY02'
error code: 114, pc=0, call=1, seg=0
114 Attempt to access item beyond bounds of memory (Signal 11)
---- end of quote ----
I've sent further questions onto Michael via the COBOLPortal forum site --
including confirming the PATH setting, the ODBC driver in question, the name
of that DLL, and searching his PC to see where that driver DLL resides
on-disk -- so hopefully we can get to the bottom of this.
SimonT.
|
|
|
|
|