Skip to Content.
Sympa Menu

freetds - Multiple queries from 1 dbopen??,

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Dennis N." <nicklaus AT crusher.fnal.gov>
  • To: freetds
  • Subject: Multiple queries from 1 dbopen??,
  • Date: Wed, 30 Aug 2000 14:33:4


Hello all,
Can someone help me get more than one SQL query per login?

I'm using freetds 5.0 and the dbtest.c program in the samples/
directory. I successfully connect to our database and can
execute a query and get its results. But then, I want to
perform a 2nd query and that is where I get stuck.

Wne I call dbresults() the second time, I get an error:
" The token datastream length was not correct. This is an internal
protocol error." (I think it was errno 3805 or so.)

What i'm doing follows exactly what is in samples/dbtest.c:
dbopen()
dbcmd()
dbsqlexec()
dbresults()
dbbind()
while (dbnextrow(dbproc)!=NO_MORE_ROWS)
then repeat from dbcmd() on down. The second time through I always
get this datastream length error.

This happens with my freetds built under sun-solaris and under vxworks.

I don't want to have to re-login (dbclose and another dbopen)
each time I want a new query. Can someone tell me how to use
the dblib stuff better to solve this problem?
Thanks!
nicklaus AT fnal.gov



  • Multiple queries from 1 dbopen??,, Dennis N., 08/30/2000

Archive powered by MHonArc 2.6.24.

Top of Page