Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Problems reading a bigint from a table

$
0
0

We have a table that has a bigint identity column. WE have a sproc that returns the max value of the identity column as a bigint. IT returns it in a resultset.

We have a utility that runs on Unix, which uses freetds library to invoke the stored procedure and read the value of the bigint from the resultset.

On executing this procedure, we find that the value that is being read is garbage.

The stored procedure query is very simple

SELECT MaxValue=MAX(IdentityColumnID) FROM dbo.Table 

When we switched on detailed logging on the unix side, we find that the server is advertizing the datatype of the returned value as a NUMERIC, and not a BigInt.

We have the following version of SQL server.

Microsoft SQL Server 2008 (SP3) - 10.0.5500.0 (X64)   Sep 21 2011 22:45:45   Copyright (c) 1988-2008 Microsoft Corporation  Developer Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) 

--

Is there some setting on the server that is making this happen?


feroze
--
My blog (including System.Net topics

 Subscribe in a reader

Instruction on how to create a tracelog with your System.Net application
System.Net Links and HOWTOs


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>