FW: 01000 (20017) [unixODBC][FreeTDS][SQL Server]Unexpected EOF from the server
Mark Norman <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <C96C6674C054914694BE187B99C585A003210A94E1@EXVMBX015-4.exch015.msoutlookonline.net> |
I have a Ruby program that is accessing a Microsoft SQL Server 2005 database using odbc and dbi.
I have verified that connectivity via ODBC is working by using isql
The Ruby program is, I think, ok, because it works on my Windows XP system.
When I send a SQL query which is greater than or equal to 505 bytes long, I get the error
01000 (20017) [unixODBC][FreeTDS][SQL Server]Unexpected EOF from the server
When the query is less than 505 bytes, it works - no error.
It doesn't matter what is in the query or how much data it returns, it is just the length of the query string.
Excerpt from my Ruby program:
$lhq_db = DBI.connect("DBI:ODBC:LHQDB", "mark", "<password>")
...
query = "Select SI.url, O.displayName
FROM Person P, Organization O, OrganizationPersonAccount OPA,
ServiceAccount SA, ServiceInstance SI
where P.login = '#{@user_login}' and
P.id = OPA.person_id and
P.id = SA.person_id and
OPA.organization_id = O.id and
SA.organization_id = O.id and
SA.service_id = SI.id and "
query << servers_part_of_query(@el_servers)
query << " order by SI.url, O.displayName"
stmt = $lhq_db.prepare(query)
stmt.execute()
@server_org_hash = {}
prev_url=""
orgs = Array.new
while (row=stmt.fetch)
url,org = row
#printf("%s => %s\n", url, org)
if (prev_url != url)
if (prev_url != "")
@server_org_hash[prev_url] = orgs
orgs = Array.new
end
prev_url = url
end
#puts "adding #{org}"
orgs << org
end
if prev_url != ""
@server_org_hash[prev_url] = orgs
end
stmt.finish
My setup:
Ubuntu 2.6.28-11-server #42-Ubuntu
I am using 0.82 feetds
/etc/odbc.ini
[LHQDB]
Driver = FreeTDS
Description = LHQ QA database
Trace = No
Server = 10.2.7.211
Port = 1433
TDS Version = 8.0
Database = LHQ
/etc/odbcinst.ini
[FreeTDS]
Description = v8.0
Driver = /usr/lib/odbc/libtdsodbc.so
UsageCount = 1
Thanks!!!
Mark Norman
QA Engineer, Lyris Inc.
Tel: (408) 844-2939
Cell: (408) 772-6267
Email: [email protected]
[cid:[email protected]]<http://www.lyris.com/>
4 N. 2nd Street. Suite 1100
San Jose, California 95113
www.lyris.com<http://www.lyris.com>
Join conversations and make connections on LyrisHQ.com<http://www.lyrishq.com> | Twitter<http://www.twitter.com/lyris> | Facebook<http://www.facebook.com/pages/Lyris-Inc/55773815258?ref=mf> | LinkedIn<http://www.linkedin.com/e/gis/1547537>
_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
image001.gif
(image/gif, 2.2 KB) - not displayed