[freetds] NTBSTRINGBIND in dbgetnull?

James K. Lowden jklowden at freetds.org
Mon Jun 16 00:26:43 EDT 2008


Reid, Roger L. wrote:
> We had an app break with 0.82.    We worked around it, but I'm trying to
> figure out if it's an issue in dbgetnull, or if there's something up
> with our app.   It's worked for years with various Sybase dblibs, and
> then FreeTDS's up to 0.63 - but sometimes long standing "working bugs"
> get broken by a new release of something or other.
> 
>        dbbind (dbproc, i+1, NTBSTRINGBIND, MAXFIELD
> 	      , how == MANY ? (BYTE *)databuf[i] : (BYTE *)tmpbuf[i]);
> 
> I don't think any values are interesting here but NTBSTRINGBIND
> (maxfield is 256, databuf[i] and tmpbuf[i] are both pointers to 
> char[MAXFIELD+1])

Please try the attached patch (generated from CVS HEAD).  

I haven't tested it, but at this late hour it sure seems like a simple
fix. If it works, I'll commit it.  

The final switch in dbsetnull() should handle NTBSTRINGBIND in some way. 
That it's missing altogether looks like an oversight.  

Thanks for the problem report.  HTH.  

Regards, 

--jkl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbgetnull.diff
Type: application/octet-stream
Size: 517 bytes
Desc: not available
Url : http://lists.ibiblio.org/pipermail/freetds/attachments/20080616/a986086e/attachment.obj 


More information about the FreeTDS mailing list