Hi,

So I thought I should create a simple jdbc query to get the biggest
number in a table. This is used for creating the unique ID.

But there is something I dont see in this code that obviously is wrong:
> <nds dtdversion="4.0" ndsversion="8.x">
> <input xmlns:jdbc="urn:dirxml:jdbc">
> <jdbc:statement event-id="0" jdbc:type="query">
> <jdbc:sql>SELECT MAX(Id) FROM [Intressent2].[dbo].[Identity]</jdbc:sql>
> </jdbc:statement>
> </input>
> </nds>
> [08/24/15 15:25:11.607]:AT-IREG ST: SELECT MAX(Id) FROM
> [Intressent2].[dbo].[Identity]
> [08/24/15 15:25:11.607]:AT-IREG ST: ROLLBACK
> [08/24/15 15:25:11.607]:AT-IREG ST:
> SubscriptionShim.execute() returned:
> [08/24/15 15:25:11.607]:AT-IREG ST:
> <nds dtdversion="2.0" ndsversion="8.x" xmlns:jdbc="urn:dirxml:jdbc">
> <source>
> <product build="20150417_0410" instance="AT-IREG"
> version="4.0.1.0">DirXML Driver for JDBC</product>
> <contact>NetIQ Corporation</contact>
> </source>
> <output>
> <jdbc:result-set event-id="0">
> <jdbc:row jdbc:number="1">
> <jdbc:column jdbc:name="$1" jdbcosition="1"
> jdbc:type="java.sql.Types.INTEGER"/>
> </jdbc:row>
> </jdbc:result-set>
> <status event-id="0" level="retry" type="app-connection">
> <description>Unable to read from result set. There is a
> connectivity-related problem.</description>
> <jdbc:exception jdbc:class="java.sql.SQLException"
> jdbc:error-code="0" jdbc:sql-state="07009">
> <jdbc:message>Invalid column name $1.</jdbc:message>
> </jdbc:exception>
> </status>
> </output>
> </nds>


The query works fine in an sql-editor

Cheers


--
joakim_ganse
------------------------------------------------------------------------
joakim_ganse's Profile: https://forums.netiq.com/member.php?userid=159
View this thread: https://forums.netiq.com/showthread.php?t=54118