Re: blk_textxfer

[email protected]
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
On Thu, Jan 19, 2012 at 09:50:16AM +0000, Zhongming cai wrote:
> 
> I need some help on how to implemente the blk_textfer in freetds ctlib. ... Can someone point me some directions on how I should accomplish this?

Hello David, 

We have no working function similar to blk_textfer() in any library.  The closest we have dbmoretext().  A patch to support it would be most welcome.  

You will need for reference: 

1.  Sybase's latest TDS documentation
2.  Sybase's OpenClient library

and

3.  tcpdump
4.  ribo
5.  patience


There are bulk copy tests in src/ctlib/unittests.  I would link them to Sybase's library and make sure they work as-is.  Then modify one to use blk_textfer().  Capture the stream with tdsdump and ribo, then explain it to yourself using the documentation.  Your job is to reproduce their stream.  

 
Your implementation would be called tds_blk_textfer() in src/tds/bulk.c.  blk_textfer() would be a wrapper in src/blk.c.  Ideally, tds_blk_textfer() could be used to implement the db-lib bcp_moretext() function, too.  

Feel free to post here if you have more questions.  

--jkl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.