Skip to Content.
Sympa Menu

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

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddyz77 AT tin.it>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] FreeTDS , Win32 and Borland Builder 6.0
  • Date: Mon, 08 Sep 2003 15:45:32 -0000

Il lun, 2003-09-08 alle 17:18, David Nsengiyumva ha scritto:
> 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

Can you post a patch for this (ioctlsocket instead of setsockout) ?
I tried FreeTDS under win32 using ODBC and all tests (some months ago)
passed.

> 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

?? FreeTDS code enter in a select loop to discover when connect happen.
Did you remove this loop ?

> 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
>

Why you hard coded some configuration ? What library are you using ?
libTDS (and so other libraries) call gethostbyname by its own...

freddy77






Archive powered by MHonArc 2.6.24.

Top of Page