RE: Problem with SQLClient

Käck Tim <[email protected]>
Newsgroups gmane.comp.lib.gnustep.user
Message-ID <2DAA9B51399D0044966B1631F0D3B5D428FBDF@segotn645.vcn.ds.volvo.net>
Hi Richard,

Strangely enough, I doesn't help: 

  db = [SQLClient clientWithConfiguration: nil name: @"test"];
  [db setDebugging: 0];
  [db setDurationLogging:  -1];
  NSLog(@"Logging level is now: %@", [db durationLogging]);
  NSLog(@"Debuggings is now: %@", [db debugging]);

Gives the following:

2004-12-15 13:07:24.000 SQLTest[8230] Logging level is now: (nil)
2004-12-15 13:07:24.000 SQLTest[8230] Debuggings is now: (nil)
2004-12-15 13:07:24.000 SQLTest[8230] The current database name is:test --> This ok. This is a NSLog call 
2004-12-15 13:07:25.000 SQLTest[8230] k type:253 size: 5 val:hello
2004-12-15 13:07:25.000 SQLTest[8230] char1 type:254 size: 1 val:X
2004-12-15 13:07:25.000 SQLTest[8230] intval type:3 size: 1 val:1
2004-12-15 13:07:25.000 SQLTest[8230] realval type:5 size: 4 val:9.99
2004-12-15 13:07:25.000 SQLTest[8230] b type:252 size: 256 val:

2004-12-15 13:07:25.000 SQLTest[8230] when2 type:7 size: 14 val:20041215130724
2004-12-15 13:07:25.000 SQLTest[8230] k type:253 size: 5 val:hello
2004-12-15 13:07:25.000 SQLTest[8230] char1 type:254 size: 1 val:X
2004-12-15 13:07:25.000 SQLTest[8230] intval type:3 size: 1 val:1
2004-12-15 13:07:25.000 SQLTest[8230] realval type:5 size: 10 val:12345.6789
2004-12-15 13:07:25.000 SQLTest[8230] b type:252 size: 0 val:
2004-12-15 13:07:25.000 SQLTest[8230] when2 type:7 size: 14 val:20041215130725

Any clues? I am using latest CVS.

Best regards
Tim

-----Original Message-----
From: Richard Frith-Macdonald [mailto:[email protected]] 
Sent: den 14 december 2004 17:06
To: Käck Tim
Cc: [email protected]
Subject: Re: Problem with SQLClient


On 14 Dec 2004, at 13:39, Käck Tim wrote:

> Hi,
>
> I am quite new to Objective-C (and C as well).
> Now, I am trying to build an application which needs to access a MySQL 
> database.
>  I was tinkering with the testapplication testMysql.m for the 
> SQLClient library, but I cannot figure out how  to turn all debugging 
> off.
> I have tried with
>   [db setDurationLogging:  -1];
>
> But still I get loads of output.
>  Perhaps I should override the - debug method in the logging category?

Have you got the latest code from CVS?

You should be able to turn off debugging with [db setDebugging: 0] and query duration logging with [db setDurationLogging: -1]

The testMysql.m program uses [db setDurationLogging: 0] to turn on logging of *all* database queries ... so you would want to remove that line, from the program.
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.