mysql-cocoa-users Mailing List for MySQL Objective C API for Cocoa (Page 11)
Brought to you by:
sergecohen
You can subscribe to this list here.
| 2002 |
Jan
(2) |
Feb
|
Mar
(14) |
Apr
(5) |
May
(23) |
Jun
(8) |
Jul
(13) |
Aug
(5) |
Sep
|
Oct
(1) |
Nov
(11) |
Dec
(4) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(9) |
Feb
(6) |
Mar
(13) |
Apr
(2) |
May
(3) |
Jun
|
Jul
(5) |
Aug
(11) |
Sep
(18) |
Oct
(1) |
Nov
(15) |
Dec
(2) |
| 2004 |
Jan
(3) |
Feb
(3) |
Mar
(8) |
Apr
(1) |
May
(2) |
Jun
(3) |
Jul
(15) |
Aug
(36) |
Sep
(5) |
Oct
|
Nov
(6) |
Dec
(2) |
| 2005 |
Jan
(1) |
Feb
(11) |
Mar
(1) |
Apr
(6) |
May
|
Jun
(7) |
Jul
(3) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2006 |
Jan
(9) |
Feb
(5) |
Mar
(2) |
Apr
(1) |
May
(9) |
Jun
(2) |
Jul
(1) |
Aug
(4) |
Sep
|
Oct
(1) |
Nov
|
Dec
(2) |
| 2007 |
Jan
(23) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2008 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Serge C. <sc...@nk...> - 2003-02-26 10:14:04
|
Hello Ian. Well indeed I'm afraid you run on the most normal problem: Because of lack of time, my documentation is completely outdated (at =20 least when it comes to how to install the framework as a system =20 framework -as opposed to embedded framework-). If you want to get running as fast as possible, what I would recommend =20= is that you use the target "SMySQL_fully_embeded" from within PB and =20 build from within PB (and NOT the command line). This is the best way =20= to have a framework you can use within a GUI Cocoa application (a bit =20= explained in the README file of the version 2). If you really need the framework to work for a Cocoa GUIless (ie =20 Foundation but not AppKit) application, then you have no choice but use =20= the target named "SMySQL", still it's easier to build it in PB. With =20 version 2 the thing should run Ok. Then for an Cocoa (foundation only) =20= App to be able to use it, you should put the framework in the Framework =20= subdirectory of one of the Library directory. The documentation of the framework should be generated in the build =20 process if you have AutoDoc properly installed (ask me if you need the =20= doc and have problems to get/install AutoDoc). Other wise you can the =20= doc of the latest release (hopefully) is linked from the web page of =20 the project. Don't hesitate to mail the user mailing list for further info. Serge. PS: Sorry but I insists on that this kind of question should go to the =20= mailing list instead of directly to me. Even for you it's likely you =20 get quicker answer by answering the list directly. Le samedi, 22 f=E9v 2003, =E0 11:36 Europe/Amsterdam, Ian C Roberts a = =E9crit =20 : > Hello Serge, > > I am trying to develop an application in cocoa that will use mysql to =20= > store my data. I have come across your cocoa wrapper for the c mysql =20= > API. I am very new to this obj-orientated programming and frameworks, = =20 > and I cannot compile your cocoa framework using the command, > pbxbuild -target SMySQL -buildstyle Development install = DSTROOT=3D/ > in the 'cd SMySQL.pbproj' directory... > > It gives me the error, > /usr/bin/libtool: internal link edit command failed > ...failed DynamicLibrary.LinkUsingFileList =20 > /tmp/smysql.dst//Users/iroberts/Library/ = Frameworks/SMySQL.framework/=20 > Versions/A/SMySQL ... > ** BUILD FAILED ** > [localhost:~/downloads/smysql.1/smysql.pbproj] iroberts% > > I have mysql version 3.23.53, and have installed in /usr/local/mysql, =20= > (I have changed the mysql header file locations for your project in =20= > PB) and am using mac OS 10.2.4 > > Please can you help, I am desperate in getting my app on the way. > > BTW - I am interested in helping you develop, once I get to be a =20 > better cocoa programmer in a couple of months... > > Thanks very much, > Ian > > ---------------------------------------------------- Serge Cohen GPG Key ID: Non-Available for the moment. ---------------------------------------------------- |
|
From: Serge C. <ser...@us...> - 2003-02-26 10:13:57
|
Hello Alvaro, You can check the SMySQL_Test program (which unfortunately is=20 Foundation only, so need to be able to compile the "SMySQL" target=20 which in turns is a bit more complicated to get runing than the=20 "SMySQL_fully_embeded" for it to run). This is a very (very) simple program and has more or less what you ask=20= for. Another resource you might have missed (I hope, as I cannot provide so=20= many), is the documentation of the framework. You can access it from=20 the web page of the project: http://mysql-cocoa.sf.net/ (very top link, should go to something like:=20= http://mysql-cocoa.sf.net/SMySQL_doc). I'll still have to check (in the coming day) that this documentation is=20= up to date (let you know otherwise through the user mailing list). Last, but not least, you can be interested to ask the question to the=20 user list (and I'm asking the question). There is a few user registered=20= and maybe some one can help you (at least that's what the list is here=20= for). Serge. PS: I'm still hoping to have enough time to make a small example for=20 Bertrand, but I'm afraid this again falls in the "too complicated"=20 examples. Le lundi, 24 f=E9v 2003, =E0 20:37 Europe/Amsterdam, Alvaro Muir a =E9crit= : > Serge, > Great framework, but I am a newbie to cocoa and C programming and=20= > I was > hoping u could pass on some example source to me? All I want to do is > connect to a specific database.. Most of the examples I see prompt for=20= > user > information. I want to embed that stuff in a plist.. > > Example, > > Username =3D anonymous > Password =3D > Host =3D localhost > Db =3D localdb > > Then I would like the app to display only the sql queries I program.=20= > Again, > all of the code if find allow for too much user interaction...If you=20= > have > the time or could point me in the correct direction, Id really=20 > appreciate > it. > > --=20 > > :// alvaro > > > ---------------------------------------------------- Serge Cohen GPG Key ID: Non-Available for the moment. ---------------------------------------------------- |
|
From: Serge C. <ser...@us...> - 2003-02-26 10:13:55
|
Hello Rob, Answer to just your question: The latest version is 2. It is still active. It works on Jaguar (compile and tested on 10.2.3 and compiled Ok -but=20 not extensively tested- on 10.2.4). Hope these answers will encourage you to test it further. Serge. PS: Please address any further question to the list directly. Le lundi, 24 f=E9v 2003, =E0 22:41 Europe/Amsterdam, Robbie P. a =E9crit = : > Hello, > > I can't seem to get SMySQL working on Jaguar. Is there a new version=20= > out somewhere? Is this project still active? > > Thanks, > Rob > > > ---------------------------------------------------- Serge Cohen GPG Key ID: Non-Available for the moment. ---------------------------------------------------- |
|
From: Serge C. <ser...@us...> - 2003-02-26 10:13:55
|
Dear Lorenz Sorry not to have answered earlier. I'll try to give you as much info=20 as I can: For the SSL issue: I'm afraid I can not answer the question for sure. What I can tell you=20= is that on Jaguar (10.2.3 indeed) I managed to compile MySQL with SSL=20 support (including the libmysqlclient library onn which I rely to make=20= connection to MySQL servers). This means that even if it is not already=20= possible to use the framework as is for connecting to MySQL using SSL,=20= it should not be too difficult to get to this point. For the answer of how to manage to do it, I can suggest to ways: 1. Look the documentation of MySQL (client library) and check what is=20= required to have a SSL connection. Maybe you need to set a particular=20 flag from the MYSQL pointer. Than you can do it by default (changing=20 default in the source of the framework). 2. You can also add a method to MCPConnection to be able to set this=20= option at runtime. 3. If you can still wait a month (or maybe a bit more), you can wait=20= for me to have the time to make it. I need this time because I have a=20 lot of work now and I also need to set a SSL aware MySQL server to test=20= the new sources... which will take a bit of time for me because I've=20 never done anything similar alreasdy (basically the time to read doc,=20 reset properly the setting of my testing server, and then ONLY I can=20 modify the MCPConnection...). By the way, if you chose sol. 2. I'm (obviously) interested by the=20 modification you make to MCPConnection for further inclusion in the=20 framework (more likely as the basis of new addition to the framework). For the table type: I don't have precise answer here neither... BUT I have InnoDB running=20 on my mac, and event if so far I've never used through the framework,=20 it should not be to hard for me to test it. SO I'll try to give you a=20 documented answer in the coming two weeks (still I don't foresee any=20 reasons for that 'incompatibility', ie. my guess would be that the=20 problem does not come from the framework). For the last question I'm not sure to get it right. Let me try to=20 rephrase it (and tell if I'm wrong): When you retrieve a BLOB (or TEXT) from the DB it comes as a NSData=20 object. You want this NSData object to be (eventualy) edited as text by=20= the user. The problem you are facing is that if you transform this=20 NSData to a NSString and convert it back to a NSData later the two=20 NSData are different (so if your NSData correspond to a binary format,=20= the data gets corrupted). If this is the problem you are facing... I'll have a look to see what=20 can we do about it. The main problem I'm facing with TEXT and BLOB=20 column in a table is that one can not discriminate between the two (or=20= at least I don't know how to do it) without issuing a 'DESCRIBE'=20 command on the table (they give the same type in the MYSQL_RES field=20 types). Indeed after seeing the framework again I think the normal solution=20 would be not to use prepareBinaryData: but prepareString: instead. ie=20 once your NSData has been transformed into a string (By the way you can=20= use the method stringWithText: for that), you don't want to use=20 prepareBinaryData on it anymore. Sorry for not answering your question (still I hope you get some=20 clues), thank you very much for your feed back, and I'd hope we will=20 continue this thread whenever we have time (meaning: sorry in advance=20 if I take some time to answer to your next mail). Serge. PS: As you see, I posted this also to the user mailing list. Please I'd=20= like that all these mails go there instead of directly to me. I AM=20 READING the list, and I'm not the only one (from the number of people=20 inscribed there). I'm sure some of the few persons there might have=20 already experienced some of your problems and can help you (and me at=20 the same time). PPS: I'd be interested to know which version of the framework you are=20 using, and on what version of your own software you already are. PPPS: last remark: If the problem is the very (very) low traffic on the=20= mailing list, just consider that the traffic has to start on some=20 time... PPPPS: Sorry one more: remind me of linking to your project from the=20 framework page if it is not already done. Le mercredi, 19 f=E9v 2003, =E0 10:13 Europe/Amsterdam, Lorenz Textor a=20= =E9crit : > Hi Serge, > > As I wrote to you some months ago I'm developing an application called=20= > CocoaMySQL using your framework to connect to the MySQL server (see=20 > cocoamysql.sourceforge.net). Thanks again for coding this great=20 > framework and for making it open-source! > > I have some questions regarding the framework: > - Many persons asked me if it is possible to connect securely to the=20= > MySQL server using SSL. I looked a bit at the MySQL C API and think=20 > there is an option to do it. Would it be difficult to change the=20 > framework so that secure connections are possible? Or is it possible=20= > with the current version yet? > - Some people wrote me they have problems using other table types=20 > (InnoDB for example). Can this be a problem of the framework? > - How can I represent a BLOB field (NSData object) as a string that=20 > can be edited and saved to the database afterwards? I don't want the=20= > string to be escaped, so I can use prepareBinaryData: only after=20 > editing. Now I'm using something like > [[NSString alloc] initWithData:theData encoding:[mySQLConnection=20= > encoding]]; > In most cases this works, but with binary data (for example images)=20 > the data gets corrupted. > > Thank you for your help! > Best Regards, > Lorenz > > > ---------------------------------------------------- Serge Cohen GPG Key ID: Non-Available for the moment. ---------------------------------------------------- |
|
From: Serge C. <ser...@us...> - 2003-01-20 10:56:58
|
Hi Camille, Sorry about that, the Id: .... in the file correspond to the CVS=20 version of the file, which (unfortunately) has nothing to do with the=20 version of the fraamework... By the way, if you're looking to SMySQLResult, you are installing=20 version 1.0 (version 2.0 had the SMySQLResult class renamed MCPResult). Serge. Le dimanche, 19 jan 2003, =E0 20:53 Europe/Amsterdam, Camille=20 Goureau-Suignard a =E9crit : > Hi, > > serge said about version 1.0 and 2.0 in his last message. > > I download the last source file available on the net, and it tells=20 > version 1.6 > > // $Id: SMySQLResult.m,v 1.6 2002/05/15 11:07:30 sergecohen Exp $ > > Anybody has an idea of where I may find source codes of version 2.0 ? > > Thanks. > > Camille ---------------------------------------------------- Serge Cohen GPG Key ID: 1024D/69B1D346 ---------------------------------------------------- |
|
From: Camille Goureau-S. <sui...@wa...> - 2003-01-19 19:54:18
|
Hi, serge said about version 1.0 and 2.0 in his last message. I download the last source file available on the net, and it tells version 1.6 // $Id: SMySQLResult.m,v 1.6 2002/05/15 11:07:30 sergecohen Exp $ Anybody has an idea of where I may find source codes of version 2.0 ? Thanks. Camille |
|
From: Serge C. <ser...@us...> - 2003-01-17 09:29:11
|
Hello Camille; This part is in the code of the version 1.0 and 2.0, so if you download=20= these from the web, it should be Ok. Serge. Le vendredi, 17 jan 2003, =E0 07:55 Europe/Amsterdam, Camille=20 Goureau-Suignard a =E9crit : > Hi, > > OK, the mistake was that I set a mess between types and objects. > Serge is right, the line I modified was the line switched to if the=20 > TYPE is null. > > I'm looking to return an instance of NSNull when the data is nil. I'm=20= > still looking for that. > > Sorry. > > Camille > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: Thawte.com > Understand how to protect your customers personal information by=20 > implementing > SSL on your Apache Web Server. Click here to get our FREE Thawte=20 > Apache Guide: > = http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en > _______________________________________________ > Mysql-cocoa-users mailing list > Mys...@li... > https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users > > ---------------------------------------------------- Serge Cohen GPG Key ID: 1024D/69B1D346 ---------------------------------------------------- |
|
From: Camille Goureau-S. <sui...@wa...> - 2003-01-17 07:09:53
|
Hi, OK, the mistake was that I set a mess between types and objects. Serge is right, the line I modified was the line switched to if the TYPE is null. I'm looking to return an instance of NSNull when the data is nil. I'm still looking for that. Sorry. Camille |
|
From: Serge C. <ser...@us...> - 2003-01-16 12:25:27
|
Hi, it's me again... By the way, is there any chance we arrive at this switch statement?=20 because I guess that in this case the value pointed to by the row is=20 already NULL? To be more clear, before entering the switch statement which is=20 responsible for mapping mysql objects to Cocoa, I check if the present=20= value is not NULL (in which I do NOT perform the switch, but gives a=20 NSNull). Obviously, you arrive at this stage (where field_type =3D NULL but the=20= corresponding value is NOT NULL), can you tell the case where it=20 happens? Thanks in advance. Serge. Le jeudi, 16 jan 2003, =E0 12:01 Europe/Amsterdam, Camille=20 Goureau-Suignard a =E9crit : > Hi, > > SMySQl has a problem with fetchRowAsDictionnay. > If the field returned by the query is null (MySQL accepts this), the=20= > function has a problem. > A NSArray or NSDictionnay may not be populated with nil objects. > > it seems easy to change SMySQL to get him send back a valid=20 > NSDictionnary that has null fields : NSNull. > > in the file : SMySQLResult.m > > - (NSDictionary *)fetchRowAsDictionary > [..] > case FIELD_TYPE_NULL: > theCurrentObj =3D nil ; > break; > [...] > > change the "nil" by "[NSNull null]" to get : theCurrentObj =3D = [NSNull=20 > null] ; > > did I make a mistake ? > > Camille > |
|
From: Serge C. <ser...@us...> - 2003-01-16 12:24:55
|
Hi Camille, I never realise that I wrote that... Indeed the problem showed off when a field which of type not null is=20 set to a value of null, but I never realised that field type in itself=20= can be null. Thanks to point me this error. Serge. PS: I'll correct that in the CVS now, I'll try to update the download=20 files soon. Le jeudi, 16 jan 2003, =E0 12:01 Europe/Amsterdam, Camille=20 Goureau-Suignard a =E9crit : > Hi, > > SMySQl has a problem with fetchRowAsDictionnay. > If the field returned by the query is null (MySQL accepts this), the=20= > function has a problem. > A NSArray or NSDictionnay may not be populated with nil objects. > > it seems easy to change SMySQL to get him send back a valid=20 > NSDictionnary that has null fields : NSNull. > > in the file : SMySQLResult.m > > - (NSDictionary *)fetchRowAsDictionary > [..] > case FIELD_TYPE_NULL: > theCurrentObj =3D nil ; > break; > [...] > > change the "nil" by "[NSNull null]" to get : theCurrentObj =3D = [NSNull=20 > null] ; > > did I make a mistake ? > > Camille > |
|
From: Camille Goureau-S. <sui...@wa...> - 2003-01-16 11:01:20
|
Hi,
SMySQl has a problem with fetchRowAsDictionnay.
If the field returned by the query is null (MySQL accepts this), the
function has a problem.
A NSArray or NSDictionnay may not be populated with nil objects.
it seems easy to change SMySQL to get him send back a valid
NSDictionnary that has null fields : NSNull.
in the file : SMySQLResult.m
- (NSDictionary *)fetchRowAsDictionary
[..]
case FIELD_TYPE_NULL:
theCurrentObj = nil ;
break;
[...]
change the "nil" by "[NSNull null]" to get : theCurrentObj = [NSNull
null] ;
did I make a mistake ?
Camille
|
|
From: Serge C. <ser...@us...> - 2003-01-14 17:02:52
|
SMySQLConnection is the old name (and version) of MCPConnection.... That should answer your question. Basically, use classes starting with MCP and not SMySQL... still the=20 "general" header file is SMySQL.h and framework name is SMySQL. Serge. Le mardi, 14 jan 2003, =E0 17:40 Europe/Amsterdam, Bernd Brandes a =E9crit= : > Hi, > just found it and checked it out. > Cool. seems to provide just what I was looking for. > But the sample test program comes in at least two flavours. > One uses > SMySQLConnection *connection; > > while the other uses > MCPConnection *connection; > > The first does not compile for me and I found no definition of=20 > SMySQLConnection. > So, did I screw up different versions? > >=46rom checking version numbers everything should be equal, but = then??? > > Please, > ist this in a state of transition, are you still working on this=20 > project and of course, what ist most up to date? > > Thanks a lot, Juergen > > |
|
From: Serge C. <ser...@us...> - 2003-01-13 14:02:35
|
Hi Chris, All this has already been mentioned on the mailing list: The framework is under GPL licence, which means that you have to=20 release the source code of any application using the framework under=20 GPL licence... still you can sell the binary (if you make a free access=20= to source, and gives user the right to modify the sources...), most=20 people call this postcard-ware: Every thing is free, GPL is preserved, but user are (gently) asked to=20 support the development by funding you. Maybe you can also make the binary popup a window every now and then=20 asking to pay something to you, and having a code to stop that you can=20= send when some one as pay... still remember that even in this case any=20= user as right to modify the source (and redistribute the modified=20 source) so that it does not display the message anymore. In term of "business model" I don't know if it works Ok. Any way, remember that MySQL is under GPL, as is the client library, so=20= any software using MySQL has to be either GPL (or equivalent) or you=20 have to buy a commercial license from MySQL. If you are thinking of buying a MySQL licence, I'm still not completly=20= sure if you can use my framework. The reason is that then you need a=20 non-GPL version of the framework, which I can provide only if I also=20 have a commercial version of MySQL (as far as I understood)....=20 obviously I have action to take to check on this, so tell me if you=20 consider this option. Le lundi, 13 jan 2003, =E0 00:05 Europe/Amsterdam, Chris McSorley a = =E9crit=20 : > Hi there, > > I have a question about the MySQL Cocoa Framework that you are=20 > building. =A0I=92m currently in the planning stages for a Cocoa-based=20= > application that I think will be kinda cool and it involves the use of=20= > MySQL. =A0I was originally planning on taking a look at the C API=92s = that=20 > are posted on MySQL=92s site, but this framework seems to be exactly = the=20 > kind of thing that I=92ll need. =A0 > > I=92m currently thinking that my app will be sold for a profit (I = don=92t=20 > have my hopes up yet, but it would be really nice if this could turn=20= > into something that I could do full time so that I could make this a=20= > very nice app, but alas, the project will have to be done on the side=20= > for now so that I can pay the bills :-). =A0I don=92t expect that = =A0I=92ll be=20 > able to start on this project for a little while (I=92m finishing off=20= > the last 2 semesters of school, working full time, raising a family=20 > and am only about 1/3 of the way through the O=92Reilly Cocoa book = right=20 > now), but when I do start development, I would obviously be very=20 > interested in using and, wherever I can, help to improve upon your=20 > MySQL Framework. =A0That all being said, what kind of licensing=20 > arrangement or considerations would you have for letting me use this=20= > framework in a for-profit application? =A0 > > Chris McSorley ---------------------------------------------------- Serge Cohen GPG Key ID: 1024D/69B1D346 ---------------------------------------------------- |
|
From: Camille Goureau-S. <sui...@wa...> - 2002-12-28 18:39:01
|
You guessed right ;) Camille > Merci Serge. I guess everyone joins me to thank you and wish you a > happy new year. > Laurent > |
|
From: Bertrand M. <bma...@ma...> - 2002-12-28 14:47:25
|
<la...@op...> wrote=A0: > Merci Serge. I guess everyone joins me to thank you and wish you a > happy new year. Indeed, thanks Serge ! And happy New Year ! Bertrand Mansion Mamasam |
|
From: Laurent Domenech-C. <la...@op...> - 2002-12-28 12:52:19
|
Merci Serge. I guess everyone joins me to thank you and wish you a=20 happy new year. Regards, Laurent > From: Serge Cohen <co...@em...> > Date: Mer d=E9c 25, 2002 23:22:19 Europe/Paris > To: mys...@li... > Subject: [Mysql-cocoa-users] New releases |
|
From: Serge C. <co...@em...> - 2002-12-25 23:22:11
|
Hello Everybody; First of all, I hope every one had a merry christmas. To celebrate both the new year and the first anniversary of the framework, I'm happy to announce that I've finally found the time to make a release of the newest version of the framework (so called version-2). This version is now available as both source and binary (statically linked with libmysqlclient, so one just have to copy it in the Framework folder of an application to be able to connect to MySQL) on sourceforge File Release System. As I have a bit more time to pursue the development of the framework now, I think I'll move soon to a third version of the framework which will include the libmysqld (embeded SQL DB server).... If any one have particular wish(es) for the present (or next) version, please let it known to this list. Last (but not least), I should mention a (not so) new project present on sourceforge : http://cocoamysql.sourceforge.net/ One maybe can define it as 'a Cocoa port of PHP MyAdmin'. This uses the SMySQL framework, so it might of some help to see how it is using it. Happy new year... :-) Serge. ---------------------------------------------------- Serge Cohen GPG Key ID: 1024D/69B1D346 ---------------------------------------------------- |
|
From: Serge C. <co...@em...> - 2002-11-29 13:35:08
|
Hi Robert, I think it's really the time to go on the mailing list of mysql-cocoa... I've not at all tested the framework (nor NySQL) on Jaguar, but some=20 people on the list did. I'm sure they would answer you better than I = can. What I can tell you is no more than that is in the doc on the project=20 web page (http://mysql-cocoa.sf.net). There is also a couple of resources one can use: - http://www.entropy.ch/software/macosx/welcome.html (good one, get=20 binary, and some explanation to compile yourself -if still the same-) - http://developer.apple.com/internet/macosx/osdb.html (a very=20 comprehensive guide to MySQL installation on OS X... from Apple, that=20 should make a standard at some point) and I'm sure you can still find some more on google. By now I'm wondering if what your question is, is how to get libmysqld ?=20= (the embedded server as they call it at MySQL)? The guidelines from the resources I pointed you to should be enough. Be=20= just careful to use mysql4 (libmysqld does not exist in previous=20 versions). If you have specific problems when building the library (which is not=20 solved by these resources), I'll be happy to provide more help. Serge. PS: If you want to use libmysqld, you should be able to use the=20 framework for nearly everything, except starting the server thread (and=20= killing it), with very little modifications (mostly, modification to the=20= target, linking it to the static libmysqld instead of the sources of=20 libmysqlclient). In this case be carefull to add -fno-common during the=20= compilation of the library, and add libz to the library to link the=20 framework with (I'm afraid of being a bit criptic, but you should=20 decipher it while starting "playing" with installation of mysql and the=20= framework). Le vendredi 29 novembre 2002, =E0 01:28 , Robert Cerny a =E9crit : > Hi, > unfortunately, yes, it's an answer I didn't want to hear but it's=20 > addressing my question. It looks like I will need to work with = libmysql=20 > library. Btw, it looks like you know about mysql a lot, do you have an=20= > idea how to get libmysql for OS X? > > Thanks > Robert > > On Friday, November 29, 2002, at 01:17 PM, Serge Cohen wrote: > >> I'm afraid there is a missunderstanding... >> >> The SMySQL_fully_embeded version of the framework does not need=20 >> libmysqlclient around (it contains the code of it). STILL it is only=20= >> able to connect to an (existing and runing) MySQL DB server. >> >> In other word, this is not (yet) a version of the framework which=20 >> contains the DB, it is only able to be client of a DB server. This=20 >> version will hopefully come (soon ?), but is not existing so far. >> >> To put it in other words: >> If you want to use MySQL using the SMySQL framework, you need both: >> 1. the SMySQL_fully_embeded version of the framework (in your=20 >> application bundle) >> 2. a running MySQL server (either on same computer or accross = network) >> >> >> Was that your question? >> >> Serge. >> >> >> Le vendredi 29 novembre 2002, =E0 01:01 , Robert Cerny a =E9crit : >> >>> Hi Serge, >>> thanks for your very long email even it didn't answer all my=20 >>> questions. Maybe the libmysqlclient name is a little bit confusing=20= >>> but I would like to be 100% sure I understand it well. >>> Is it possible, using SMySQL_fully_embeded target, create an = internal=20 >>> database inside my application and maintain it? I don't need add=20 >>> records but make some selects and populate them in tableviews... >>> >>> Thanks >>> Robert >>> >>> On Friday, November 29, 2002, at 11:17 AM, Serge Cohen wrote: >>> >>>> Hi, >>>> >>>> I'll post this also to the user mailing list... I think it can be = of=20 >>>> interest for people there as well (and maybe someone over here will=20= >>>> be better at explaining the differences between targets, and more=20= >>>> objective about pros and cons of the framework). >>>> >>>> Let me explain the actual status of the framework: There is 3=20 >>>> targets for the moment : >>>> >>>> 1. SMySQL : This is a framework to be put in one of the=20 >>>> Library/Framework places, and it needs the libmysqlclient.dylib to=20= >>>> work properly. This is interesting mainly for command line tools, = as=20 >>>> such tools cannot be linked with a "bundled" framework. >>>> >>>> For GUI application (anything comming as a bundle) >>>> >>>> 2. SMySQL_embeded, is made to be put in the directory :=20 >>>> @executable_path/../Frameworks (Rem: @executable path is the path=20= >>>> to the real executatble, something like=20 >>>> .../your_app.app/Contents/MacOS/your_app, then the framework is in=20= >>>> directory: .../your_app.app/Contents/Frameworks/SMySQL.framework=20 >>>> -which is a directory as well-). >>>> This is nice because if you distribute a application peoples = doesn't=20 >>>> need to install the framework by them self (it comes bundled within=20= >>>> the application). >>>> The draw back of this target, is that it still needs the=20 >>>> libmysqlclient.dylib (in the proper place, being=20 >>>> /usr/local/lib/mysql/libmysqlclient.dylib). >>>> >>>> 3. SMySQL_fully_embeded : The last solution is something I've done=20= >>>> later to overcome the problem of installing libmysqlclient.dylib: = it=20 >>>> include (staticaly) the libmysqlclient (using slightly modified=20 >>>> sources from mysql 3.23.??? -don't remember anymore, but should be=20= >>>> in the sources-). To use it in an application, you just put it in=20= >>>> the bundle (cf. 2), you DO NOT NEED the system wide=20 >>>> libmysqlclient.dylib required by previous two solutions. >>>> >>>> >>>> Hope this is clear... other wise just bother me about it (please on=20= >>>> the list). >>>> >>>> >>>> Serge. >>>> >>>> PS: Did you managed with CVS? are you using the version 2 = framework? >>>> PPS: In some near future, I'll be directly linking with the static=20= >>>> version of libmysqlclient (whereas for the moment I'm getting the=20= >>>> object files within the project). That mean some one will need the=20= >>>> library (static) on the computer to be able to build SMySQL ("fully=20= >>>> emebeded")... Do anyone see problems from that? >>>> >>>> >>>> Le vendredi 29 novembre 2002, =E0 08:08 , Robert Cerny a =E9crit : >>>> >>>>> Hi, >>>>> thanks again. At first, I'm not very sure about the purpose of = your=20 >>>>> classes. I need to implement some lightweight database mechanism = in=20 >>>>> my ObjC program. I did believe that your framework is exactly what=20= >>>>> I need but after reading tons of emails, web pages etc. I'm not so=20= >>>>> sure now... >>>>> I did build the framework and did install it onto its designed=20 >>>>> place - ~/Library/Frameworks. However I'm sure how to get the=20 >>>>> libmysqlclient.dylib and if I need it at all. >>>>> Could you bring me a little bit of light in it? >>>>> >>>>> Thanks a lot >>>>> Robert >>>>> ---------------------------------------------------- Serge Cohen GPG Key ID: 1024D/69B1D346 ---------------------------------------------------- >>>> >>> >>> >> > > |
|
From: Bertrand M. <bma...@wa...> - 2002-11-29 12:24:45
|
Hi Roger, Just as a side note, your choice will really depend on how many records you need to handle. In case there are just a few, you can use an NSArchive and store that in memory. In case you need an embedded DB, you might want to look at SQLite. there is a cocoa framework for this small DB available somewhere on the net. Go there and search for SQL: http://cocoa.mamasam.com/links Good luck Bertrand Mansion Mamasam le 29/11/02 13:17, Serge Cohen =E0 co...@em... a =E9crit=A0: > I'm afraid there is a missunderstanding... >=20 > The SMySQL_fully_embeded version of the framework does not need > libmysqlclient around (it contains the code of it). STILL it is only > able to connect to an (existing and runing) MySQL DB server. >=20 > In other word, this is not (yet) a version of the framework which > contains the DB, it is only able to be client of a DB server. This > version will hopefully come (soon ?), but is not existing so far. >=20 > To put it in other words: > If you want to use MySQL using the SMySQL framework, you need both: > 1. the SMySQL_fully_embeded version of the framework (in your > application bundle) > 2. a running MySQL server (either on same computer or accross network) >=20 >=20 > Was that your question? >=20 > Serge. >=20 >=20 > Le vendredi 29 novembre 2002, =E0 01:01 , Robert Cerny a =E9crit : >=20 >> Hi Serge, >> thanks for your very long email even it didn't answer all my questions. >> Maybe the libmysqlclient name is a little bit confusing but I would >> like to be 100% sure I understand it well. >> Is it possible, using SMySQL_fully_embeded target, create an internal >> database inside my application and maintain it? I don't need add >> records but make some selects and populate them in tableviews... >>=20 >> Thanks >> Robert |
|
From: Serge C. <co...@em...> - 2002-11-29 12:17:29
|
I'm afraid there is a missunderstanding...
The SMySQL_fully_embeded version of the framework does not need=20
libmysqlclient around (it contains the code of it). STILL it is only=20
able to connect to an (existing and runing) MySQL DB server.
In other word, this is not (yet) a version of the framework which=20
contains the DB, it is only able to be client of a DB server. This=20
version will hopefully come (soon ?), but is not existing so far.
To put it in other words:
If you want to use MySQL using the SMySQL framework, you need both:
1. the SMySQL_fully_embeded version of the framework (in your=20
application bundle)
2. a running MySQL server (either on same computer or accross network)
Was that your question?
Serge.
Le vendredi 29 novembre 2002, =E0 01:01 , Robert Cerny a =E9crit :
> Hi Serge,
> thanks for your very long email even it didn't answer all my =
questions.=20
> Maybe the libmysqlclient name is a little bit confusing but I would=20
> like to be 100% sure I understand it well.
> Is it possible, using SMySQL_fully_embeded target, create an internal=20=
> database inside my application and maintain it? I don't need add=20
> records but make some selects and populate them in tableviews...
>
> Thanks
> Robert
>
> On Friday, November 29, 2002, at 11:17 AM, Serge Cohen wrote:
>
>> Hi,
>>
>> I'll post this also to the user mailing list... I think it can be of=20=
>> interest for people there as well (and maybe someone over here will =
be=20
>> better at explaining the differences between targets, and more=20
>> objective about pros and cons of the framework).
>>
>> Let me explain the actual status of the framework: There is 3 targets=20=
>> for the moment :
>>
>> 1. SMySQL : This is a framework to be put in one of the=20
>> Library/Framework places, and it needs the libmysqlclient.dylib to=20
>> work properly. This is interesting mainly for command line tools, as=20=
>> such tools cannot be linked with a "bundled" framework.
>>
>> For GUI application (anything comming as a bundle)
>>
>> 2. SMySQL_embeded, is made to be put in the directory :=20
>> @executable_path/../Frameworks (Rem: @executable path is the path to=20=
>> the real executatble, something like=20
>> .../your_app.app/Contents/MacOS/your_app, then the framework is in=20
>> directory: .../your_app.app/Contents/Frameworks/SMySQL.framework=20
>> -which is a directory as well-).
>> This is nice because if you distribute a application peoples doesn't=20=
>> need to install the framework by them self (it comes bundled within=20=
>> the application).
>> The draw back of this target, is that it still needs the=20
>> libmysqlclient.dylib (in the proper place, being=20
>> /usr/local/lib/mysql/libmysqlclient.dylib).
>>
>> 3. SMySQL_fully_embeded : The last solution is something I've done=20
>> later to overcome the problem of installing libmysqlclient.dylib: it=20=
>> include (staticaly) the libmysqlclient (using slightly modified=20
>> sources from mysql 3.23.??? -don't remember anymore, but should be in=20=
>> the sources-). To use it in an application, you just put it in the=20
>> bundle (cf. 2), you DO NOT NEED the system wide libmysqlclient.dylib=20=
>> required by previous two solutions.
>>
>>
>> Hope this is clear... other wise just bother me about it (please on=20=
>> the list).
>>
>>
>> Serge.
>>
>> PS: Did you managed with CVS? are you using the version 2 framework?
>> PPS: In some near future, I'll be directly linking with the static=20
>> version of libmysqlclient (whereas for the moment I'm getting the=20
>> object files within the project). That mean some one will need the=20
>> library (static) on the computer to be able to build SMySQL ("fully=20=
>> emebeded")... Do anyone see problems from that?
>>
>>
>> Le vendredi 29 novembre 2002, =E0 08:08 , Robert Cerny a =E9crit :
>>
>>> Hi,
>>> thanks again. At first, I'm not very sure about the purpose of your=20=
>>> classes. I need to implement some lightweight database mechanism in=20=
>>> my ObjC program. I did believe that your framework is exactly what I=20=
>>> need but after reading tons of emails, web pages etc. I'm not so =
sure=20
>>> now...
>>> I did build the framework and did install it onto its designed=20
>>> place - ~/Library/Frameworks. However I'm sure how to get the=20
>>> libmysqlclient.dylib and if I need it at all.
>>> Could you bring me a little bit of light in it?
>>>
>>> Thanks a lot
>>> Robert
>>>
----------------------------------------------------
Serge Cohen
GPG Key ID: 1024D/69B1D346
----------------------------------------------------
>>
>
>
|
|
From: Serge C. <co...@em...> - 2002-11-29 12:10:26
|
Robert, it's me again... I just realise I only partly answered your question. In the respect of how to use the classes of the framework: 1. There is a very short example in the begining of the documentation of=20= the class MCPConnection 2. The design of the Obj-C wrapper is the same of the C library (which=20= is also mirrored in other wrapper like PHP): There is basically two object - a Connection object (which keeps the connection to the DB, you only=20= need one such object by DB you are using). - a Result object (keeping the table of results of a query, one per=20= query more or less) This is better (hopefully) explained in the header of the doc pages of=20= the different classes (which I encourage you to read). If you don't have=20= the doc (you need to install autodoc to be able to generate it), you can=20= get them online here: http://mysql-cocoa.sourceforge.net/SMySQL_doc/ All the MCP... documentation should be up to date (just uploaded them a=20= minute ago) Otherwise, you can also get an idea of the concept by reading the API (C=20= and PHP) part of the MySQL reference manual. Serge. Le vendredi 29 novembre 2002, =E0 08:08 , Robert Cerny a =E9crit : > Hi, > thanks again. At first, I'm not very sure about the purpose of your=20 > classes. I need to implement some lightweight database mechanism in my=20= > ObjC program. I did believe that your framework is exactly what I need=20= > but after reading tons of emails, web pages etc. I'm not so sure = now... > I did build the framework and did install it onto its designed place -=20= > ~/Library/Frameworks. However I'm sure how to get the=20 > libmysqlclient.dylib and if I need it at all. > Could you bring me a little bit of light in it? > > Thanks a lot > Robert > > On Thursday, November 28, 2002, at 10:09 PM, Serge Cohen wrote: > ---------------------------------------------------- Serge Cohen GPG Key ID: 1024D/69B1D346 ---------------------------------------------------- |
|
From: Serge C. <co...@em...> - 2002-11-29 10:40:30
|
Hello,
I think this is adressed in the doc...
The main problem is that the mysqlclient library does not give a way to=20=
discriminate between a blob and a text column (neither smalltext and=20
smallblob...)
The choice I've made is that any thing coming in one of this format=20
(column with variable size) is put in a NSData (so that if you have a=20
blob you don't corrupt is trying to converrt it from one encoding to=20
another).
Then (at least in version 2 of the framework), there is the method
- (NSString *) stringWithText:(NSData *) theTextData;
both form MCPREsult and MCPConnection which will convert a NSData=20
holding text in the encoding used by mysql to a NSString: you use this=20=
method if you know that the column you're interested in is text...
If you have a solution to know if a column is text (and not blob) at the=20=
time I'm making a query, then I'd be pleased to get it and make the=20
MCPResult return directly a NSString (instead of NSData)...
In short, if you want text use the code:
SMySQLResult *newsResult =3D [[[SMySQLResult alloc] init] =
autorelease];
NSArray *newsFields =3D [[[NSArray alloc] init] autorelease];
newsResult =3D [newsConnection queryString:@"select * from test"];
newsFields =3D [newsResult fetchRowAsArray];
NSLog(@"%@", [newsResult stringWithText:[newsFields=20
objectAtIndex:0]]);
Hope that helps...
Serge.
Le mardi 8 octobre 2002, =E0 03:03 , Syphor a =E9crit :
> Dear List,
> I'm using the MySQL framework to connect to a mysql db. =
When=20
> I send a query to my db my result is in a type of hex. This is my=20
> code...
>
> SMySQLResult *newsResult =3D [[[SMySQLResult alloc] init]=20
> autorelease];
> NSArray *newsFields =3D [[[NSArray alloc] init] autorelease];
>
> newsResult =3D [newsConnection queryString:@"select * from test"];
> newsFields =3D [newsResult fetchRowAsArray];
>
> NSLog(@"%@", [newsFields objectAtIndex:0]);
>
> the table test has (Bam text) so it should return text... though it=20
> returns a type of hex as the result... anyway here is the result:
>
> <677468>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Mysql-cocoa-users mailing list
> Mys...@li...
> https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users
>
>
----------------------------------------------------
Serge Cohen
GPG Key ID: 1024D/69B1D346
----------------------------------------------------
|
|
From: Serge C. <co...@em...> - 2002-11-29 10:31:18
|
Hi Stuart, Sorry to come to you so late, maybe you already got some answer? My answer would be the following: 1. Use the SMySQL_fully_embeded target for the framework 2. In your application target, add a Copy Files build phase. Set it to copy the build framework to Frameworks (cf. image) |
|
From: Serge C. <co...@em...> - 2002-11-29 10:17:39
|
Hi,
I'll post this also to the user mailing list... I think it can be of=20
interest for people there as well (and maybe someone over here will be=20=
better at explaining the differences between targets, and more objective=20=
about pros and cons of the framework).
Let me explain the actual status of the framework: There is 3 targets=20
for the moment :
1. SMySQL : This is a framework to be put in one of the=20
Library/Framework places, and it needs the libmysqlclient.dylib to work=20=
properly. This is interesting mainly for command line tools, as such=20
tools cannot be linked with a "bundled" framework.
For GUI application (anything comming as a bundle)
2. SMySQL_embeded, is made to be put in the directory :=20
@executable_path/../Frameworks (Rem: @executable path is the path to=20
the real executatble, something like=20
.../your_app.app/Contents/MacOS/your_app, then the framework is in=20
directory : .../your_app.app/Contents/Frameworks/SMySQL.framework -which=20=
is a directory as well-).
This is nice because if you distribute a application peoples doesn't=20
need to install the framework by them self (it comes bundled within the=20=
application).
The draw back of this target, is that it still needs the=20
libmysqlclient.dylib (in the proper place, being=20
/usr/local/lib/mysql/libmysqlclient.dylib).
3. SMySQL_fully_embeded : The last solution is something I've done later=20=
to overcome the problem of installing libmysqlclient.dylib: it include=20=
(staticaly) the libmysqlclient (using slightly modified sources from=20
mysql 3.23.??? -don't remember anymore, but should be in the sources-).=20=
To use it in an application, you just put it in the bundle (cf. 2), you=20=
DO NOT NEED the system wide libmysqlclient.dylib required by previous=20
two solutions.
Hope this is clear... other wise just bother me about it (please on the=20=
list).
Serge.
PS: Did you managed with CVS? are you using the version 2 framework?
PPS: In some near future, I'll be directly linking with the static=20
version of libmysqlclient (whereas for the moment I'm getting the object=20=
files within the project). That mean some one will need the library=20
(static) on the computer to be able to build SMySQL ("fully=20
emebeded")... Do anyone see problems from that?
Le vendredi 29 novembre 2002, =E0 08:08 , Robert Cerny a =E9crit :
> Hi,
> thanks again. At first, I'm not very sure about the purpose of your=20
> classes. I need to implement some lightweight database mechanism in my=20=
> ObjC program. I did believe that your framework is exactly what I need=20=
> but after reading tons of emails, web pages etc. I'm not so sure =
now...
> I did build the framework and did install it onto its designed place -=20=
> ~/Library/Frameworks. However I'm sure how to get the=20
> libmysqlclient.dylib and if I need it at all.
> Could you bring me a little bit of light in it?
>
> Thanks a lot
> Robert
>
----------------------------------------------------
Serge Cohen
GPG Key ID: 1024D/69B1D346
----------------------------------------------------
|
|
From: Camille Goureau-S. <sui...@wa...> - 2002-11-24 19:57:06
|
Hi all the problem was that the file loaded by Internet explorer had not enough character in its name to support the full name and extention. I just had to add ".dmg" after the file name and all was clear. Camille |