[freetds] output parameters and "unknown marker"

Paparo, Joshua Joshua.Paparo at bankofamerica.com
Thu Jan 6 13:22:10 EST 2005


Here it is. 

create procedure pdtGetDealRevalDates
	@dealid ObjectID,
	@pricingDate Date,
	@last Date output,
	@prev Date output
as
begin
	select @last = max(RevalDate) from DealValueRecorder where
RevalDate < @pricingDate
	select @prev = max(RevalDate) from DealValueRecorder where
RevalDate < @last
end

GO


Il giorno gio, 06-01-2005 alle 12:00 -0500, Lowden, James K ha scritto:
> > From: Thompson, Bill D (London)
> > Sent: Thursday, January 06, 2005 11:33 AM
> > 
> > certainly our code seems not to handle the data that's coming our
way...
> > I think the issue might be with using TDS 8.0 rather than 7.0 - I
didn't know there was a difference in the AC(param) token between these
two versions but there does appear to be...
> 
> Bill, 
> 
> Could it be that datatype 3D (datetime) should be treated as variable
length?  
> 
> Here's my analysis of the packet, based on
http://www.freetds.org/tds.html#responses:
> 
> Return Status:
> 79  00 00 00 00 
>     (zero)
> 
> 
> Output Parameter 1:
> ac  1100  05  4000 6c00 6100 7300 7400  01 3d 00 00 00  3d  00 
>               (5-char name)             (5 bytes unk.)      ^^ length?
> 
> 
> Output Parameter 2:
> ac  1100  05  4000 7000 7200 6500 7600  01 3d 00 00 00  3d  00 
>               (5-char name)             (5 bytes unk.)      ^^ length?
> 
> Process Done:
> fe  0000  e000  01000000
> (no more results, row count not valid)
> 
> I imagine the "unknown" bytes are collation data.
> 
> 

No unknown should be 

01           flags
3d 00 00 00  usertype
3d           type

Usually under mssql bit 0 on status means nullable. It seems that in
some condition mssql return for nullable datetime using not nullable
type and nullable flag. As you can see parameter in input are passed
using not nullable type, perhaps this cause the problem.

Declaration of pdtGetDealRevalDates would help.

freddy77


_______________________________________________
FreeTDS mailing list
FreeTDS at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds



Notice to recipient:
The information in this internet e-mail and any attachments is confidential and may be privileged. It is intended solely for the addressee. If you are not the intended addressee please notify the sender immediately by telephone. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful.

When addressed to external clients any opinions or advice contained in this internet e-mail are subject to the terms and conditions expressed in any applicable governing terms of business or client engagement letter issued by the pertinent Bank of America group entity.

If this email originates from the U.K. please note that Bank of America, N.A., London Branch, Banc of America Securities Limited and Banc of America Futures Incorporated are authorised and regulated by the Financial Services Authority.



More information about the FreeTDS mailing list