Re: [Sqlrelay-discussion] Connecting from Ruby to FreeTDS to Microsoft SQL Server 7.0
Brought to you by:
mused
From: Firstworks/4access <dav...@fi...> - 2005-08-26 16:30:20
|
The only thing that stands out is the call to endSession(), but it should be ok to call that as the result set should have been cached on the client side. Try removing that and see what you get. Also, try calling con.debugOn() after creating con and see if the output doesn't reveal the problem. If it doesn't, then send me the output and I'll look at it too. Dave dav...@fi... On Thu, 2005-08-25 at 10:42 -0500, Ben Gribaudo wrote: > Hi, > > I am working on setting up a new Debian 3.1 server. So far, I can use > sqlrsh to query my database but I can't access the same sqlrelay connect > via Ruby.. Would any of you know what I'm doing wrong? I've even copied > my Ruby code to a Debian Woody server (which uses a Sybase driver > instead of FreeTDS) and it works. > > Thank you, > Ben Gribaudo > > Example: (usernane/password/socket/port replaced with dummy values) > ================================================ > I can run this: > # sqlrsh localhost 8000 /tmp/name.socket user pass > SQLRShell - Version 0.22 > Connected to: localhost:8000 as user > > type help; for a help. > > 0> select * from sysobjects; > name id xtype uid info status > base_schema_ver replinfo parent_obj crdate ftcatid > schema_ver stats_schema_ver type userstat sysstat indexdel > refdate version deltrig instrig updtrig > seltrig category cache > ============================================================================================================================================================================================================================================================================================ > > sysobjects 1 S 1 25 -2147483645 > 68 0 0 Fri Nov 13 03:00:19 1998 0 > 64 4 S 1 113 [...] > > but if I try to run > > require('sqlrelay') > > puts "HERE!" > con=SQLRConnection.new("localhost",8000,"/tmp/name.socket","user","pass",0,1) > > cur=SQLRCursor.new(con) > cur.sendQuery("select * from sysobjects") > con.endSession() > > for row in 0..cur.rowCount()-1 do > rowarray=cur.getRow(row) > for col in 0..cur.colCount() do > puts rowarray[col] > puts "," > end > puts "\n" > end > > all I get is "HERE!" and then I'm back at a shell prompt. > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > |