[freetds] db-lib: msgno 20002

Kevin Voell kevin.voell at mac.com
Sat May 24 16:49:37 EDT 2008


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
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds




More information about the FreeTDS mailing list