Skip to Content.
Sympa Menu

freetds - [freetds] FreeTDS , Win32 and Borland Builder 6.0

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "David Nsengiyumva" <davidn AT finsolutions.co.za>
  • To: "James K. Lowden" <jklowden AT schemamania.org>
  • Cc: mickael AT easyplay.com.tw, freetds AT lists.ibiblio.org
  • Subject: [freetds] FreeTDS , Win32 and Borland Builder 6.0
  • Date: Mon, 8 Sep 2003 13:42:51 +0200

Dear James,

I have compiled and built a Win32 lib from FreeTDS source code and I am
trying to use it. I've built it with Borland C++ Builder 6.0. The problem I
am having now is that I can create successfully the socket in the
"tds_connect(TDSSOCKET * tds, TDSCONNECTINFO * connect_info)" method
(login.c file in tds) and I set the I/O mode of the socket to non-blocking
using the ioctlsocket function (because that's what it has to be). I connect
successfully to the server but because it's a non-blocking socket there is
no way I can know that the method completed successfully. Because
non-blocking sockets don't actually wait for the successfull completion of
the operation. Anyway I've checked the log files and I can see the sent and
received headers and packets.
But the problem is that when I try to execute a query then the select
function in the "tds_check_socket_write(TDSSOCKET * tds)" method (write.c
file in tds) return an error (code 10038) which means that:

WSAENOTSOCK (10038)
Socket operation on non-socket.
An operation was attempted on something that is not a socket. Either the
socket handle parameter did not reference a valid socket, or for select, a
member of an fd_set was not valid.

And obviously the writting will then not succeed.

What can be wrong??? Can anybody help please????

I've set the fd_set members correctly using FD_SET methods...

N.B:
----
I've kind of hard coded some required data such as the Db Hostname. I've
actually used the gethostbyname function from winsock to resolve the IP
address of the server given its name and it does actually works...And I've
done all the initialization required (WSAStartup) before using the winsock
functions. And even SAMETHING happens when I use a blocking socket!!! This
is kind of urgent so if you've got a hint or any suggestions please let me
know asap....Thanx a lot

David





Archive powered by MHonArc 2.6.24.

Top of Page