Patch: literals in SQL replaced with parameters

Money Manager Ex Development related posts
(http://github.moneymanagerex.org/)
elliswr
MMEX Developer
Posts: 102
Joined: Tue May 05, 2009 8:21 am
Are you a spam bot?: No
Location: Granbury, TX
Contact:

Re: Patch: literals in SQL replaced with parameters

Post by elliswr »

Lost 22 of the 28 errors. Now only six remain. All related to st.Bind(i++, numRepeats) or st.Bind(2, numRepeats);

Error is "Call of overloaded 'Bind(int, long int&)' is ambiguous in dbwrapper.cpp / bills depositsdialog.cpp"

Vadim
MMEX Developer
Posts: 142
Joined: Mon Aug 03, 2009 7:35 am
Are you a spam bot?: No

Re: Patch: literals in SQL replaced with parameters

Post by Vadim »

Fixed, archive updated.

elliswr
MMEX Developer
Posts: 102
Joined: Tue May 05, 2009 8:21 am
Are you a spam bot?: No
Location: Granbury, TX
Contact:

Re: Patch: literals in SQL replaced with parameters

Post by elliswr »

What was the cause of the bug?

I'll check updated archive tonight.

Vadim
MMEX Developer
Posts: 142
Joined: Mon Aug 03, 2009 7:35 am
Are you a spam bot?: No

Re: Patch: literals in SQL replaced with parameters

Post by Vadim »

That was not a bug. It's just a different compiler :-)
Signatures of Bind are
Bind(int, int)
Bind(int, wxLongLong).

On Win32 sizeof(long) == sizeof(int), thus call to Bind(int, long) matches Bind(int, int).
On Mac call to Bind(int, long) may be matches Bind(int, int) and Bind(int, wxLongLong).
You can check yourself :-)

elliswr
MMEX Developer
Posts: 102
Joined: Tue May 05, 2009 8:21 am
Are you a spam bot?: No
Location: Granbury, TX
Contact:

Re: Patch: literals in SQL replaced with parameters

Post by elliswr »

Vadim,
Works perfectly! And thanks for taking the time to explain the reason I was getting errors. You clearly have a better understanding of all this than I do, and I hope you don't mind if I come to you when I get stuck.

madhan
Site Admin
Posts: 99
Joined: Sun Nov 30, 2008 8:06 pm

Re: Patch: literals in SQL replaced with parameters

Post by madhan »

Hello Vadim, I think this is quite a significant patch to MMEX and I welcome the change as well as the reasons to do it.
MMEX started when I was working with databases the first time so naturally the code is crufty and definitely has room for improvement.

Having said that, I think the best way to get this patch is not me managing writing these changes in SVN and ensuring the fixes go in related to changes to this patch, which will get fairly inefficient and laborious.
It might be better if you or other people can be added to the MMEX project as contributors with SVN write access. I will send email to discuss this in greater detail.

Vadim
MMEX Developer
Posts: 142
Joined: Mon Aug 03, 2009 7:35 am
Are you a spam bot?: No

Re: Patch: literals in SQL replaced with parameters

Post by Vadim »

Patch applied, revision 410.

Post Reply