[freetds] TDS server - error messages and "fFunction 999"

Steve Kirkendall skirkendall at dsl-only.net
Fri May 7 20:22:51 EDT 2004


My little server is starting to stabilize.  At present, my biggest
questions are:

* When is it safe the server to send error messages?  Currently my server
  just calls tds_send_message(...) immediately when an error is detected
  such as a bad column name in the SQL request, but that causes
  Crystal Reports to crash!

* If I try to use Access 2000 to access my server, it fails immediately
  after logging in, before I can send any requests.  Here's the tail of
  the log file from the client-side ODBC, where things go wrong...

    ...
    17:55:48 looking for login token, got  fd(DONE)
    17:55:48 tds_process_default_tokens() marker is fd(DONE)
    17:55:48 tds_process_end: more_results = 0
                    was_cancelled = 0
                    error = 0
                    done_count_valid = 0
    17:55:48 tds_process_end() state set to TDS_IDLE
    17:55:48 leaving tds_process_login_tokens() returning 1
    SQLGetFunctions: fFunction is 999
    17:55:48 tds_free_all_results()
    SQLFreeHandle(2, 0x9060750)
    SQLFreeHandle(1, 0x9060f30)

  That "999" thing looks suspicious to me, but I don't really understand
  what's going on.  From the server side, it appears that the client simply
  closes the socket immediately after logging in.

By the way, I have started collecting some of the things I've learned
while writing this server into an HTML file.  The current version of the
file (which is still *very* incomplete, and possibly even wrong in some
places) is available now at...

	http://www.cs.pdx.edu/~kirkenda/tdsserver.html

-- 
Steve Kirkendall    |A:It is confusing, since people don't read that way
kirkenda at cs.pdx.edu |Q:Why is top-posting bad?
                    |A:It is adding comments to the top of a message
                    |Q:What is top-posting?



More information about the FreeTDS mailing list