Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC Call failing with new TDAT32.dll...

Status
Not open for further replies.

ZemogSC

Programmer
Sep 29, 2003
30
US
We have a problem with a new installation of TDAT32.DLL. Hopefully someone knows what teh problem is, and can get me on the right track to fix it...



Here is our execute command:

rc = SQLExecDirect(Hstmt,szSqlStr, cbSqlStr);


Here are the values in the variables:
Hstmt 0x007f1b48
- szSqlStr 0x0006fd68 "EXEC LOGNPPROC (?,?,?, ?,?,?,?)"
69 'E'
cbSqlStr -3
rc 0
fRetVal 1
rcCancel -1


Here is the DDL for the macro:

REPLACE MACRO LOGNPPROC (

PROCESSID SMALLINT FORMAT '9999' NOT NULL,
PROCESS CHAR (48) NOT NULL,
RUNCD BYTEINT FORMAT '99' NOT NULL,
PRIMTBL CHAR (12),
DFPIPECD CHAR (1),
PRIMTPLCNT INTEGER FORMAT '9999999999',
CMTS CHAR (64)
)
AS
(
BEGIN TRANSACTION
;
INSERT INTO NPPROCLG (
ACTDATE,
ACTTIME,
USERID,
PROCESSID,
PROCESS,
RUNCD,
PRIMTBL,
DFPIPECD,
PRIMTPLCNT,
CMTS)
VALUES (DATE,
TIME,
USER,
:pROCESSID,
:pROCESS,
:RUNCD,
:pRIMTBL,
:DFPIPECD,
:pRIMTPLCNT,
:CMTS)
;
END TRANSACTION
;

)
;

These are the values entered in to the table after execution with the old driver:
03/12/10 16:00:00 NPSUPER 1710 Open NP Business 01 P 0000000000 Starting


When this is run using the old driver (V 2.06.00.03) it runs fine. When run with the new driver (V 3.02.00.00) it gives the following error:

Unhandled exception in INITNPGL.EXE (TDAT32.DLL): 0xc0000005: Access Violation


Any ideas????
 
We just (right before the holiday break) figured out what the problem was with this code, and I'm posting the answer in case anyone is interested.

The SqlSetParam function is not mapped properly by the ODBC manager, so old code needs to be changed to the SQLBindParam function call. This will prevent the error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top