Thread: (Fwd) Problems with my code under linux ??
Hi, I simply got no answer. Why ? Thanks ------- Forwarded Message Follows ------- From: "Lothar Behrens" <lothar.behrens@lollisoft.de> To: pgsql-odbc@postgresql.org Date sent: Thu, 25 Mar 2004 20:24:16 +0100 Subject: [ODBC] Problems with my code under linux ?? Hi, I am writing a multiplatform library including also an ODBC wrapper. In this wrapper class I have no problem when I run the sample app under windows, but if I run it on linux I get not that change I like to get. Now I tried to update the driver to the latest version, but I get touble while connection. I have a suse linux 8.0 and the latest version from their web site. Why is it not possible to use your code under suse linux ? Are there special tasks to install it correctly or must I wait until suse has a new update ? Thank you Lothar ---- My home: www.lollisoft.de ----------------------------- Lothar Behrens | Independent: lothar.behrens@gmx.de Rosmarinstr 3 | My public project: 40235 Düsseldorf | http://sourceforge.net/projects/lbdmf | -> Need comments, please visit :-) ---------------------------(end of broadcast)------------------------- -- TIP 8: explain analyze is your friend ---- My home: www.lollisoft.de ----------------------------- Lothar Behrens | Independent: lothar.behrens@gmx.de Rosmarinstr 3 | My public project: 40235 Düsseldorf | http://sourceforge.net/projects/lbdmf | -> Need comments, please visit :-)
On Wednesday 07 April 2004 19:58, Lothar Behrens wrote: > Hi, > > I simply got no answer. Why ? Lothar - you need to provide some facts. From your text below: 1. You are using ODBC 2. You are updating something (you don't say what) You are having a problem (you don't say what) 3. You are using SuSe You have the latest version of something (you don't say what) from their website 4. It's not possible to use something (you don't say what) under SuSe. If you can say exactly what you are having problems with, and any error messages you get then someone might be able to help. > I am writing a multiplatform library including also an ODBC wrapper. > > In this wrapper class I have no problem when I run the sample app > under windows, but if I run it on linux I get not that change I like > to get. > > Now I tried to update the driver to the latest version, but I get > touble while connection. > > I have a suse linux 8.0 and the latest version from their web site. > > Why is it not possible to use your code under suse linux ? > > Are there special tasks to install it correctly or must I wait until > suse has a new update ? -- Richard Huxton Archonet Ltd
On Monday 12 April 2004 20:48, Lothar Behrens wrote: > > On Wednesday 07 April 2004 19:58, Lothar Behrens wrote: > > 2. You are updating something (you don't say what) > > I am updating a char column. It does not that, what is intended. > > > You are having a problem (you don't say what) > > It simply writes an empty char into the database - not my sample text. Very strange. > > 3. You are using SuSe > > You have the latest version of something (you don't say what) from > > their > > website > > I mean your source code. I have downloaded it from Gborg web site. > I can compile it and install, but it doesn't work properly. Do you mean the psql-odbc project: http://gborg.postgresql.org/project/psqlodbc/projdisplay.php I wasn't aware it was intended for anything other than Windows. What ODBC manager are you using under SuSe? > I have figured out, that if I set the windows ODBC configuration > to debug all things, then it works properly. Is the problem with a client on Windows/SuSe or both? > After that, I tried to do the same under linux. No success. > > I think, I have a very stange problem in my memory handling or > something like alignment. The code itself works - as I have seen. > > Do you have an ODBC test application that runs under linux and > windows ? Your best bet is to turn on logging at the client (odbc) end, and statement logging at the PostgreSQL end. That usually helps me identify where my problem is. -- Richard Huxton Archonet Ltd
> On Monday 12 April 2004 20:48, Lothar Behrens wrote: > > > On Wednesday 07 April 2004 19:58, Lothar Behrens wrote: > > > > 2. You are updating something (you don't say what) > > > > I am updating a char column. It does not that, what is intended. > > > > > You are having a problem (you don't say what) > > > > It simply writes an empty char into the database - not my sample text. > > Very strange. > > > > 3. You are using SuSe > > > You have the latest version of something (you don't say what) from > > > their > > > website > > > > I mean your source code. I have downloaded it from Gborg web site. > > I can compile it and install, but it doesn't work properly. > > Do you mean the psql-odbc project: > http://gborg.postgresql.org/project/psqlodbc/projdisplay.php > I wasn't aware it was intended for anything other than Windows. What ODBC > manager are you using under SuSe? I assume unixODBC with odbc.ini and odbcinst.ini whereas iodbc uses only odbc.ini, as read in your installation descriptions. Today I will try to save my old configuration files and make a clean iodbc installation - with your code and descriptions. > > > I have figured out, that if I set the windows ODBC configuration > > to debug all things, then it works properly. > > Is the problem with a client on Windows/SuSe or both? Under windows, it changes from buggy to work properly, if I activate global debugging. Under linux I haven't found the correct switches. > > > After that, I tried to do the same under linux. No success. > > > > I think, I have a very stange problem in my memory handling or > > something like alignment. The code itself works - as I have seen. > > > > Do you have an ODBC test application that runs under linux and > > windows ? > > Your best bet is to turn on logging at the client (odbc) end, and > statement logging at the PostgreSQL end. That usually helps me identify > where my problem is. Logging at the client (windows) solves the problem. :-( I like to see, what pointer is used inside the SQLUpdate function. I'll also try to activate server side logging. Under linux I have found a memory overrun with using strcat on a char* parameter. Electric Fence was the tool, that solved a crash occuring on a very different location. Are similar tools available for windows (free or GPL...) ? Should I try it on the psqlODBC sourcecode too - and how ? It may be really strange. My code is LGPL'ed, would it be the best, you - as a psqlODBC developer (I hope) - try that code ? This is not a must. I'll try first the above steps. Thanks Lothar > > -- > Richard Huxton > Archonet Ltd > ---- My home: www.lollisoft.de ----------------------------- Lothar Behrens | Independent: lothar.behrens@gmx.de Rosmarinstr 3 | My public project: 40235 Düsseldorf | http://sourceforge.net/projects/lbdmf | -> Need comments, please visit :-)