Hi Paul,

stored procedures also for a simple lookup?

-- 
Gianni

On Wed, 4 Feb 2009 10:32:55 +0000, Paul Hill <[email protected]> wrote:

>Hi Gianni,
>
>Why not use stored procedures?
>
>Paul
>
>On Wed, Feb 4, 2009 at 10:01 AM, Gianni Turri <[email protected]> wrote:
>> Hi all!
>>
>> In the effort to develop a system capable to connect indifferently to MS SQL 
>> and MySQL I am facing another problem.
>>
>> Query using concatenated fields are broken using MySQL as database backend.
>>
>> Note that with MS SQL Server everything works as expected.
>>
>> Sample code:
>>
>> select * from MyTable where code1 + code2 = ?vp_code
>>
>> where code1 and code1 are Char.
>>
>> in MySql the correct syntax for this query is:
>>
>> select * from MyTable where concat(code1, code2) = ?vp_code
>>
>> One solution would be to use this more basic syntax:
>>
>> select * from MyTable where code1 = ?vp_code1 and code2 = ?vp_code2
>>
>> but this force me to rewrite too much code.
>>
>> In conclusion:
>> trying to develop a system capable to connect indifferently to MS SQL and 
>> MySQL is becoming more and more complex... may be too much.
>>
>> My system is as follow:
>> Windows XP Pro SP3
>> VFP 9 SP1
>> MySQL Server 5.1
>> MS SQL Server 2008
>>
>> --
>> Gianni

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to