Skip to Content.
Sympa Menu

freetds - RE: [freetds] unixODBC via FreeTDS, PHP and Stored Procedure Help

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Joseph Geiser" <joe AT mail.paravisions.com>
  • To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] unixODBC via FreeTDS, PHP and Stored Procedure Help
  • Date: Thu, 1 Jul 2004 16:46:06 -0400

> We now have a db-lib test facility: bsqldb, first included in
> 0.62.3. (If you want a man page, though, get a nightly
> snapshot.) The attached script works with bsqldb; I'd be
> curious to know if isql can process it, too. But: all it's
> doing is T-SQL. If you use the -v option, bsqldb will show
> you that no parameters are returned as such to the client.

Just an FYI... here are the results of this test (some data modified for
obvious reasons)

[joe@server www]# bsqldb -S server -U sa -P pass -D dbname -i odbctest-bsql
-o odbctest-bsql-out -v
bsqldb:157: Verbose operation enabled
bsqldb:207: Query:
declare @cid cursor,@rcid int,@rpid int,@rtid varchar(20)
exec mt_testhash @hashin='1h88f9',@hashdata=@cid output
fetch next from @cid into @rcid,@rpid,@rtid
while @@fetch_status=0
begin
print cast(@rcid as varchar(10)) + ' - ' + cast(@rpid as
varchar(10)) + ' - ' + @rtid
fetch next from @cid into @rcid,@rpid,@rtid
end
close @cid
deallocate @cid

bsqldb:180: dbsqlsend() OK:
bsqldb:188: dbsqlok() OK:
bsqldb:261: calling dbresults OK:
Result set 1
Freeing prior allocations
Allocating buffers
Allocating compute buffers
Metadata
col name source type
size varys
------ ------------------------------ ------------------------------
--------------- ------ ------

Data
Retrieving return status... Procedure returned 0
1 rows affected
Retrieving output parameters... none
bsqldb:583: dbresults() returned NO_MORE_RESULTS (2):

Is this what should be expected? Just wondering... To answer the other
question - isql won't handle the above -- even with \n inserted between
commands and sending it as a single string.

Cheers,
Joe



Archive powered by MHonArc 2.6.24.

Top of Page