Re: db-lib: msgno 20002

Kevin Voell <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Please ignore this whole thread I finally got it working.

Had to recompile my freetds libraries, I must have compiled them  
incorrectly the first time.

I now have an xcode cocoa application returning data from a MS SQL  
database.

Once I get a good example or two I will submit them to be included  
with the distribution, with the hope they will be useful to someone  
else.

Thanks


On May 24, 2008, at 3:54 PM, Kevin Voell wrote:

> D'oh I forgot to include the error and message handler functions.
>
> So I got past that error now I'm getting:
> SQLTester: Msg 20017, Level 9
> Unexpected EOF from the server
>
> SQLTester: Msg 20002, Level 9
> Adaptive Server connection failed
>
> Any thoughts on these?
>
> Thanks
>
>
> On May 24, 2008, at 2:49 PM, Kevin Voell wrote:
>
>> 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
>>
>> _______________________________________________
>> FreeTDS mailing list
>> [email protected]
>> http://lists.ibiblio.org/mailman/listinfo/freetds
>
> _______________________________________________
> 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.