[ wxwindows-Bugs-1705217 ] wxODBC don\'t update data

SourceForge.net noreply at sourceforge.net
Wed Oct 24 16:30:49 PDT 2007


Bugs item #1705217, was opened at 2007-04-22 12:34
Message generated for change (Comment added) made by vadz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1705217&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Database
Group: Must fix
>Status: Closed
Resolution: None
Priority: 6
Private: No
Submitted By: Borja Torres (torresborja)
Assigned to: Nobody/Anonymous (nobody)
>Summary: wxODBC don\'t update data

Initial Comment:
Hi, with wxMSW 2.8.3 in ANSI, wxODBC don't update the data in the database.
wxDbTable::Update don´t update data.
wxDbTable::UpdateWhere don't update data.
This is with my access database and dBase and too in the db wxWidgets' sample.
In wxMSW 2.6.4 all is Ok, but in this version (2.8.3) is wrong.

Thanks and excuse me but my bad english.



----------------------------------------------------------------------

Comment By: Vadim Zeitlin (vadz)
Date: 2007-10-25 01:30

Message:
Logged In: YES 
user_id=71618
Originator: NO

We're sorry, but wxODBC is not maintained and has been removed from the
latest wxWidgets versions because of this. We're unfortunately unable to
fix bugs in it, please consider using one of the other open source ODBC
libraries instead.

----------------------------------------------------------------------

Comment By: Borja Torres (torresborja)
Date: 2007-04-25 11:56

Message:
Logged In: YES 
user_id=1652683
Originator: YES

tan_b, with your code of the funtion "bool wxDbTable::bindCols(HSTMT
cursor)" all is Ok.
Thank you very much.

If this is a know bug, why isn't including in 2.8.3 version?

My last bug that I send was: [ 1602031 ] wxODBC with UNICODE in wxMSW
don't go
It is a serius bug and a regression.
							
Thanks.



----------------------------------------------------------------------

Comment By: Laumingis Skripkauskas (laumingis)
Date: 2007-04-24 17:56

Message:
Logged In: YES 
user_id=1639972
Originator: NO

I use wxWidgets 2.8.3. 2.6.3 was ok as well.

My exact configure command is as follows:
../configure --enable-intl --enable-catch_segvs --enable-debugreport
--enable-dynlib --enable-dynamicloader --enable-unicode --with-odbc
--disable-precomp-headers --enable-richtext

I use iodbc I think as only odbc dev package is installed on my system:
libiodbc2-dev:
  Installed: 3.52.4-3

Some lines from configure output:
checking for GTK+ - version >= 2.0.0... yes (version 2.8.20)
checking sql.h usability... yes
checking sql.h presence... yes
checking for sql.h... yes
checking for SQLAllocEnv in -liodbc... yes

Configured wxWidgets 2.8.3 for `i686-pc-linux-gnu'

  Which GUI toolkit should wxWidgets use?                 GTK+ 2
  Should wxWidgets be compiled into single library?       no
  Should wxWidgets be compiled in debug mode?             no
  Should wxWidgets be linked as a shared library?         yes
  Should wxWidgets be compiled in Unicode mode?           yes
  What level of wxWidgets compatibility should be enabled?
                                       wxWidgets 2.4      no
                                       wxWidgets 2.6      yes
  Which libraries should wxWidgets use?
                                       jpeg               sys
                                       png                sys
                                       regex              builtin
                                       tiff               sys
                                       zlib               sys
                                       odbc               sys
                                       expat              sys
                                       libmspack          no
                                       sdl                no




----------------------------------------------------------------------

Comment By: Borja Torres (torresborja)
Date: 2007-04-24 12:11

Message:
Logged In: YES 
user_id=1652683
Originator: YES

I use Windows XP SP2

----------------------------------------------------------------------

Comment By: Andrey Turkin (tan_b)
Date: 2007-04-24 09:03

Message:
Logged In: YES 
user_id=1694270
Originator: NO

It is known bug. I belive it will correct soon. Right now i can suggest
this workaround. Replace wxDbTable::bindCols(HSTMT cursor) method in
dbtable.cpp on this:

/********** wxDbTable::bindCols() **********/
bool wxDbTable::bindCols(HSTMT cursor)
{
    static SQLLEN cb;
    // Bind each column of the table to a memory address for fetching
data
    UWORD i;
    for (i = 0; i < m_numCols; i++)
    {
        cb = colDefs[i].CbValue;
        if (SQLBindCol(cursor, (UWORD)(i+1), colDefs[i].SqlCtype, (UCHAR*)
colDefs[i].PtrDataObj,
                       colDefs[i].SzDataObj, &cb ) != SQL_SUCCESS)
          return (pDb->DispAllErrors(henv, hdbc, cursor));
    }

    // Completed successfully
    return true;
}  // wxDbTable::bindCols()


----------------------------------------------------------------------

Comment By: ONEEYEMAN (oneeyeman)
Date: 2007-04-24 07:00

Message:
Logged In: YES 
user_id=1325635
Originator: NO

laumingis,
How did you compile wxGTK? 
Do you use iODBC or unixODBC?
What version do you have?

When I tried I got the compiler error about conversion (don't remember the
details now)....

Thank you.

----------------------------------------------------------------------

Comment By: Borja Torres (torresborja)
Date: 2007-04-23 21:10

Message:
Logged In: YES 
user_id=1652683
Originator: YES

I develop under Windows XP SP2, with ANSI build of wxWidgets 2.8.3
I use Access Database and the type of the field than I want update are
text (51 characters) and memo (65535 characters). I connect directly with
wxODBC.
Neither text neither memo field are updating.

Thanks.
Excuse me by to put the priority of the bug.

----------------------------------------------------------------------

Comment By: Laumingis Skripkauskas (laumingis)
Date: 2007-04-23 18:06

Message:
Logged In: YES 
user_id=1639972
Originator: NO

The previous comment is misleading: wxWidgets do compile and work in
UNICODE + GTK2. It does not work with mysql+UNICODE as mysql odbc drivers
are broken in UNICODE. But at least UNICODE+postgresql+GTK2/MSW is ok.

----------------------------------------------------------------------

Comment By: ONEEYEMAN (oneeyeman)
Date: 2007-04-23 09:48

Message:
Logged In: YES 
user_id=1325635
Originator: NO

Borya,
If you are developing cross-platform between MSW and GTK, then you need to
use ANSI, simply due to the fact that wxODBC does not compile in UNICODE
for wxGTK.

Also, what DB do you use and what driver? You connecting through pool or
directly?

What is the type of the field you are trying to update?

Thank you.

----------------------------------------------------------------------

Comment By: Vadim Zeitlin (vadz)
Date: 2007-04-23 02:24

Message:
Logged In: YES 
user_id=71618
Originator: NO

Sorry, the priority is determined by importance of this bug to wx and not
to you so please let me set it. It is a serius bug, mainly because it's a
regression, but giving it a higher priority doesn't help to fix it anyhow.

----------------------------------------------------------------------

Comment By: Borja Torres (torresborja)
Date: 2007-04-22 18:45

Message:
Logged In: YES 
user_id=1652683
Originator: YES

I use ANSI build because in Unicode, wxODBC don't connect to the
database.
In the Db sample, when you create a new record all is ok, but when you
want update this record, if you put more characters in a field that there
was, the update is only to the length of the old value.
Example:
I create a record and in the first field I write 1234567890.
I edit this record and in this field I write 0987654321XXXXXX and I
update.
The value that is update is 0987654321, 10 characters not 16, the XXXXXX
are lost.

I have a project that I need update fields and I need "memo" fields. The
priority should be 9 because wxODBC don't run in version 2.8.x 

----------------------------------------------------------------------

Comment By: Vadim Zeitlin (vadz)
Date: 2007-04-22 17:18

Message:
Logged In: YES 
user_id=71618
Originator: NO

Do you use ANSI or Unicode build?

----------------------------------------------------------------------

Comment By: Borja Torres (torresborja)
Date: 2007-04-22 12:38

Message:
Logged In: YES 
user_id=1652683
Originator: YES

I am using Visual 2005 Express, mingw32 3.4.2 and Digital Mars 8.49.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1705217&group_id=9863




More information about the wx-dev mailing list