Re: ct_connect returns failure

"James K. Lowden" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
developer loke wrote:
> Hi. This is my first post. I am a novice in freetds programming, and am
> trying to connect to a Microsoft Server 2008. I am able to connect with
> tsql -Svirtual -Usa -Ddatabase -Ppass. I have set the environment
> variable TDSVER=8.0 . I am trying to use the included c code, but the
> return at the last line in the following code is 0. What am I doing
> wrong?

http://www.sybase.com/detail?id=1013159
http://www.sybase.com/content/1013159/db2ct.tar

That's a URL for "Sample Programs for the DB-Library to Client-Library
Migration Guide" and the associated ct-lib sample code.  Have a look at
ctfirst.c.  

I'm more of a db-lib guy myself.  It looks to me like you're not setting
up your error & message handlers.  

HTH.  

--jkl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.