SQL print cmd from DB-LIB

SQL print cmd from DB-LIB

Post by Eric W Burg » Thu, 22 Sep 1994 10:24:25



Is it possible for a DB-LIB program to receive "print" results
from a server?  Clearly it's possible: isql can do it.  However,
I'm going batty RTFM-ing, and I've still not found it!

How?  dbresults() gets us results from SELECTS / computes;
dbretstat() gets us return values.  Print results are neither
(even though I tried just to be sure).

For those that don't understand what I'm looking for, I want
to pick up the string printed by, e.g.
        (void)dbcmd(dbproc, "print \"hello world\"");
        (void)dbsqlexec(dbproc);

TIA

--
--  Eric William Burger       --  +1 301/417-0700(v) 0707(f) --
--  George Mason University   --  SITE PhD Program           --
--  The Telephone Connection  --  Director of Engineering    --
The views expressed above do not necessarily reflect the views
of George Mason University or The Telephone Connection.

 
 
 

SQL print cmd from DB-LIB

Post by Joel Friedm » Thu, 22 Sep 1994 19:44:30



->Is it possible for a DB-LIB program to receive "print" results
->from a server?  Clearly it's possible: isql can do it.  However,
->I'm going batty RTFM-ing, and I've still not found it!
->
->How?  dbresults() gets us results from SELECTS / computes;
->dbretstat() gets us return values.  Print results are neither
->(even though I tried just to be sure).
->
->For those that don't understand what I'm looking for, I want
->to pick up the string printed by, e.g.
->   (void)dbcmd(dbproc, "print \"hello world\"");
->   (void)dbsqlexec(dbproc);
->
->TIA
->
->--
->--  Eric William Burger       --  +1 301/417-0700(v) 0707(f) --
->--  George Mason University   --  SITE PhD Program           --
->--  The Telephone Connection  --  Director of Engineering    --
->The views expressed above do not necessarily reflect the views
->of George Mason University or The Telephone Connection.

Well, the reason you are not seeing any results is that "PRINT"
sends its results to the message handler and not to the query
buffer. To see "hello world", print the msg_text in your message
handler. Keep in mind that if a set of commands returns a row AND
it does a PRINT, that all of the rows would have to be processed
before the PRINT message would be seen.

I hope that this clears things up for you.

---
====================================================================
                            |
       _/ _/_/_/ _/_/_/ _/  | Joel Friedman (consultant)
      _/ _/  _/ _/     _/   |
     _/ _/  _/ _/_/   _/    | - "If you've got a solution, let me
 _/ _/ _/  _/ _/     _/     |    find the problem."
 _/_/ _/_/_/ _/_/_/ _/_/_/  |

====================================================================

 
 
 

SQL print cmd from DB-LIB

Post by Eric W Burg » Tue, 27 Sep 1994 05:13:39



Quote:> Is it possible for a DB-LIB program to receive "print" results
> from a server?  Clearly it's possible: isql can do it.  However,
> I'm going batty RTFM-ing, and I've still not found it!

A print message is (confirmed by code) severity 0, msgno 0.

Thanks to




--
--  Eric William Burger       --  +1 301/417-0700(v) 0707(f) --
--  George Mason University   --  SITE PhD Program           --
--  The Telephone Connection  --  Director of Engineering    --
The views expressed above do not necessarily reflect the views
of George Mason University or The Telephone Connection.

 
 
 

1. Help! CT-Lib vs DB-Lib


We have a user interface package on top of Sybase, viz. UnifAce.
The UnifAce helpdesk really encouraged us to switch from dblib to ctlib.
They almost made it look like that we wouldn't get any support anymore from
them if we didn't.
I guess so because of what the UnifAce helpdesk required from us.

Paul Rambags
MediaWare BV
The Netherlands

2. US-OH-Columbus Software Engineer, UNIX, C++, CORBA, Oracle (1235-1845)

3. open client client lib vs db lib

4. Systems Engineer/PC Developer

5. OpenClient / TDS / DB-Lib / CT-Lib

6. Links Related To comp.databases.progress - FREE ACCESS

7. Locking db-lib vs: ct-lib

8. Trigger not working for Update

9. can DB-Lib and CT-Lib coexist?

10. CT Lib vs DB Lib What's the Diff

11. DB-Lib vs CT-Lib

12. Advantages of CT-Lib over DB-Lib ???