Skip to Content.
Sympa Menu

freetds - Re: [freetds] bcp_done always returns error if no data was inserted

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Craig A. Berry" <craigberry AT mac.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] bcp_done always returns error if no data was inserted
  • Date: Thu, 04 Dec 2014 22:14:47 -0600


> On Dec 3, 2014, at 10:30 AM, Angelo Coccimiglio <ACoccimiglio AT OLG.CA> wrote:
>
> Hello,
>
> I'm new to freetds... running version FREETDS-0_91

Try 0.92 and see if there's any difference.

> Whenever an attempt to bcp data within a C program and there are no
> records
> the bcp_done routine returns -1 indicating an error... If there are
> records
> available to bcp works fine..

I haven't been able to find any documentation indicating what bcp_done should
do if there are no records. There's quite likely an oversight for that case
in the FreeTDS library but if there's any chance you could try your code with
a Microsoft or Sybase library and confirm it works there that would help. Or
post a small reproducer.

>
> Is there anything I should be looking for or setting up..
> Here is part of the log wher bcp_done is called
>
> 1$DGA1808:[TSG.ACOCCIMIGLIO.VMS_1.FREETDS-0_91.SRC.TDS]UTIL.C;1:156:Changed
> query state from PENDING to DEAD
> $1$DGA1808:[TSG.ACOCCIMIGLIO.VMS_1.FREETDS-0_91.SRC.DBLIB]DBLIB.C;46:326:dblib_release_tds_ctx(1)
> $1$DGA1808:[TSG.ACOCCIMIGLIO.VMS_1.FREETDS-0_91.SRC.DBLIB]DBLIB.C;46:6321:dbfreebuf(5DD490)
> $1$DGA1808:[TSG.ACOCCIMIGLIO.VMS_1.FREETDS-0_91.SRC.DBLIB]DBLIB.C;46:4984:dberrhandle(0)
> $1$DGA1808:[TSG.ACOCCIMIGLIO.VMS_1.FREETDS-0_91.SRC.DBLIB]DBLIB.C;46:4984:dberrhandle(0)
> $1$DGA1808:[TSG.ACOCCIMIGLIO.VMS_1.FREETDS-0_91.SRC.DBLIB]DBLIB.C;46:5003:dbmsghandle(0)
> $1$DGA1808:[TSG.ACOCCIMIGLIO.VMS_1.FREETDS-0_91.SRC.DBLIB]DBLIB.C;46:5003:dbmsghandle(180298)
> $1$DGA1808:[TSG.ACOCCIMIGLIO.VMS_1.FREETDS-0_91.SRC.DBLIB]DBLIB.C;46:1689:dbresults(5B9F40)
> $1$DGA1808:[TSG.ACOCCIMIGLIO.VMS_1.FREETDS-0_91.SRC.DBLIB]DBLIB.C;46:1695:dbresults:
>
> dbresults_state is 3 (_DB_RES_NEXT_RESULT)
> $1$DGA1808:[TSG.ACOCCIMIGLIO.VMS_1.FREETDS-0_91.SRC.TDS]TOKEN.C;1:540:tds_process_tokens(5BA7A0,
>
> 7ACFBA58, 7ACFBA50, 0x6914)
> $1$DGA1808:[TSG.ACOCCIMIGLIO.VMS_1.FREETDS-0_91.SRC.TDS]TOKEN.C;1:543:tds_process_tokens()
>
> state is COMPLETED
> $1$DGA1808:[TSG.ACOCCIMIGLIO.VMS_1.FREETDS-0_91.SRC.DBLIB]DBLIB.C;46:1716:dbresults()
>
> tds_process_tokens returned 2 (TDS_NO_MORE_RE?
> result_type TDS_DONE_RESULT
> $1$DGA1808:[TSG.ACOCCIMIGLIO.VMS_1.FREETDS-0_91.SRC.DBLIB]DBLIB.C;46:1678:dbresults
>
> returning 2 (NO_MORE_RESULTS)
> $1$DGA1808:[TSG.ACOCCIMIGLIO.VMS_1.FREETDS-0_91.SRC.DBLIB]BCP.C;3:2251:bcp_done(5C5E00)
> $1$DGA1808:[TSG.ACOCCIMIGLIO.VMS_1.FREETDS-0_91.SRC.TDS]BULK.C;1:886:tds_bcp_done(5C6620,
>
> 7ACFBA50)
> $1$DGA1808:[TSG.ACOCCIMIGLIO.VMS_1.FREETDS-0_91.SRC.TDS]NET.C;1:741:Sending
> packet
> 0000 0f 01 00 08 00 00 00 00- |........|
>
>
> thanks
>
> Angelo Coccimiglio
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds

________________________________________
Craig A. Berry
mailto:craigberry AT mac.com

"... getting out of a sonnet is much more
difficult than getting in."
Brad Leithauser





Archive powered by MHonArc 2.6.24.

Top of Page