Focal Point
FOC 1400 and FOC1406

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3907030816

March 19, 2012, 12:12 PM
dburton
FOC 1400 and FOC1406
The error message I am receiving is as follows:

(FOC1400) SQLCODE IS -1 (HEX: FFFFFFFF)
: Microsoft OLE DB Provider for SQL Server: [] Cannot create new connectio
: n because in manual or distributed transaction mode.
L (FOC1406) SQL OPEN CURSOR ERROR. :

I have tried renaming the tags in the joins in case that was an issue but that didn't work. I'm not really sure where to start on this one. Can someone give some insight?

Thanks.


WebFOCUS 7.7.03
Windows Web Server 2008
MS SQL Server 2000
Excel,CSV,PDF,HTML
March 19, 2012, 01:22 PM
MattC
Is your SQL going against 2 different SQL Server databases? I had a similiar issue years ago when doing this.

I had our DBA's create links or synonyms in one of the databases to get around the issue.


WebFOCUS 8.1.05
March 19, 2012, 04:53 PM
Waz
This may help, or not.

https://techsupport.informatio...utions/63092535.html


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

March 20, 2012, 02:08 PM
dburton
@MattC - I am only using one database to get my information. It is only when I join the one table it seems and I don't have to use that table. Prior to this bit of code, I have this table in a separate JOIN statement. However, I am using JOIN CLEAR * at the beginning of every new JOIN statement. This has never been a problem before, not sure why it is starting all of a sudden.

@Waz - I'm not using DataMigrator or the DBLOOKUP command. Unless, WF uses DBLOOKUP without me knowing, this is very possible. Smiler

Like I said above, if I remove the JOIN statement it works without a problem.

Any other suggestions?

Thanks.


WebFOCUS 7.7.03
Windows Web Server 2008
MS SQL Server 2000
Excel,CSV,PDF,HTML
March 20, 2012, 05:45 PM
Waz
Even if it does not seem related, did you try ENGINE SQLMSS SET FASTLOAD OFF


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

March 21, 2012, 08:20 AM
dburton
quote:
Originally posted by Waz:
Even if it does not seem related, did you try ENGINE SQLMSS SET FASTLOAD OFF


Yes, I did try it and it doesn't make a difference. I have concluded that it has to do with my JOIN statements.

The error messages give me the error with the second JOIN statement and table QC_RESULTS. This only occurs when I try to print something from QC_RESULTS. If I don't print anything, the report runs.
 
JOIN CLEAR *
JOIN
 INNER LJ1HOLD.LJ1HOLD.FINAL_RUN_ID IN LJ1HOLD TO UNIQUE
 GETRUNANALYSES.INPUT.@RUNID IN GETRUNANALYSES TAG J12 AS J12
 END
JOIN
 INNER LJ1HOLD.LJ1HOLD.FINAL_RUN_ID IN LJ1HOLD TO UNIQUE
 QC_RESULTS.QC_RESULTS.RUN_ID IN QC_RESULTS TAG J4 AS J4
 END
JOIN
 INNER J4.QC_RESULTS.ANALYTESCHEME_ID IN LJ1HOLD TO UNIQUE
 TBL_ANALYTESCHEMES.TBL_ANALYTESCHEMES.ANALYTESCHEME_ID IN TBL_ANALYTESCHEMES
 TAG J7 AS J7
 END
JOIN
 INNER J7.TBL_ANALYTESCHEMES.ANALYTE_ID IN LJ1HOLD TO UNIQUE
 TBL_ANALYTES.TBL_ANALYTES.ANALYTE_ID IN TBL_ANALYTES TAG J13 AS J13
 END


If I take the same tables and JOIN the third table differently, the errors then occur on the TBL_ANALYTESCHEMES table instead of QC_RESULTS table. Again, it only gives the errors when I try to print something from the TBL_ANALYTESCHEMES table.

  
JOIN CLEAR *
JOIN
 INNER LJ1HOLD.LJ1HOLD.FINAL_RUN_ID IN LJ1HOLD TO UNIQUE
 GETRUNANALYSES.INPUT.@RUNID IN GETRUNANALYSES TAG J12 AS J12
 END
JOIN
 INNER LJ1HOLD.LJ1HOLD.FINAL_RUN_ID IN LJ1HOLD TO UNIQUE
 QC_RESULTS.QC_RESULTS.RUN_ID IN QC_RESULTS TAG J4 AS J4
 END
JOIN
 INNER LJ1HOLD.LJ1HOLD.ANALYTESCHEME_ID IN LJ1HOLD TO UNIQUE
 TBL_ANALYTESCHEMES.TBL_ANALYTESCHEMES.ANALYTESCHEME_ID IN TBL_ANALYTESCHEMES
 TAG J7 AS J7
 END
JOIN
 INNER J7.TBL_ANALYTESCHEMES.ANALYTE_ID IN LJ1HOLD TO UNIQUE
 TBL_ANALYTES.TBL_ANALYTES.ANALYTE_ID IN TBL_ANALYTES TAG J13 AS J13
 END


I'm really confused about why this is happening. Any other suggestions?

Thanks.


WebFOCUS 7.7.03
Windows Web Server 2008
MS SQL Server 2000
Excel,CSV,PDF,HTML
March 21, 2012, 11:43 AM
GamP
It may also help to take a look at the sql being generated. And you could comtenplate to let focus do the join iso sql server. There are settings for that, although I can't remember exactly what they are.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
March 21, 2012, 01:32 PM
dburton
quote:
Originally posted by GamP:
It may also help to take a look at the sql being generated. And you could comtenplate to let focus do the join iso sql server. There are settings for that, although I can't remember exactly what they are.


This is the code I have for showing the SQL Trace, however, I can't seem to find the SQL even if I use "View Source".

-SET &ECHO=ALL;
SET TRACEOFF = ALL
SET TRACEON = STMTRACE/CLIENT
SET TRACEON = STMTRACE/CLIENT
SET TRACEON = STMTRACE/CLIENT
SET TRACESTAMP = OFF
SET TRACEWRAP = 78
SET TRACEUSER = ON
SET XRETRIEVAL=OFF


Is there anything wrong with the code above?

Thanks.


WebFOCUS 7.7.03
Windows Web Server 2008
MS SQL Server 2000
Excel,CSV,PDF,HTML