db-lib: msgno 20002

Kevin Voell <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Trying to get freetds working under xcode and am not having any luck.

I'm currently getting this error when calling dbopen();
FreeTDS: db-lib: exiting because client error handler returned 0 for  
msgno 20002


Here the code I currently have:
#import <Cocoa/Cocoa.h>
#import "sybdb.h"
#import <string.h>

char SERVER[512];

int main(int argc, char *argv[])
{
	LOGINREC *login;
	DBPROCESS *proc;
	
	// attempt to initialize the db-lib engine
	if (dbinit() != YES)
		NSLog(@"Could not initialize the db-lib");
	
	// allocate a LOGINREC structure
	login = dblogin();
	
	// set the login information
	DBSETLPWD(login, "Test");
	DBSETLUSER(login, "Test");
	
	strcpy(SERVER, "10.0.1.8:1433");
	
	// attempt to login
	proc = dbopen(login, SERVER);
	
	// free the LOGINREC structure
	dbloginfree(login);
}

Here the code I currently have:
I've checked and dbinit is returning ok and dblogin returns a valid  
pointer.
I'm trying to connect to a MS SQL server 2008.

Any ideas?

Thanks

Kevin


On May 14, 2008, at 10:10 PM, Kevin Voell wrote:

> Hi
>
> I was wondering if anyone has any examples for using freetds with  
> xcode or objective-c.
> I just downloaded and compiled freetds and I am making my way  
> through the documentation.  But if anyone has some objective-c code  
> they are willing to share, it will give me a nice head start.  I  
> found the C examples and I will work on converting them to objC, but  
> I thought I would see if anyone has done that already.
>
> Thanks
>
> Kevin
> _______________________________________________
> FreeTDS mailing list
> [email protected]
> http://lists.ibiblio.org/mailman/listinfo/freetds
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.