[Sqlrelay-discussion] Re: Connecting from Ruby to FreeTDS to Microsoft SQL Server 7.0
Brought to you by:
mused
|
From: Ben G. <me...@be...> - 2005-09-01 14:02:22
|
Howdy,
Dave, thank you for your response. I just saw it today.
In the mean time, I've removed the code I complied as best I could and
tried using only Debian packages obtained from apt-get.
Using a script similar to the one I previously posted (with or without a
call to endSession()), I get:
"/usr/local/lib/site_ruby/1.8/i386-linux/sqlrelay.so:
/usr/local/lib/site_ruby/1.8/i386-linux/sqlrelay.so: undefined symbol:
__ti13genericsocket -
/usr/local/lib/site_ruby/1.8/i386-linux/sqlrelay.so (LoadError)"
Would any of you know what's wrong? I tried Googling on this but didn't
find help there.
Thank you
Ben
=========
From: Firstworks/4access <david@fi...>
Re: Connecting from Ruby to FreeTDS to Microsoft SQL Server 7.0
2005-08-26 09:30 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
david.muse@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.
>
>
[snipped footer]
|