Replacing some characters in the generated sql command

Posts   
 
    
fdb
User
Posts: 43
Joined: 01-Jul-2008
# Posted on: 14-Sep-2010 09:05:02   

Hi, I'm using LLBLGen v2.6, Adapter mode, LINQ and .NET 3.5.

Is it possible to replace some characters in the generated sql command before it's execution. For example I need to change "~" with " " in all text columns in all tables before CRUD operations.

I have more that 100 forms so it's not possible to apply this transformations in the GUI. I'm looking for a method to apply these changes in the generated data adapter codes.

Regards, Farzad Badili

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 14-Sep-2010 09:24:02   

Do you want to replace text to be inserted or updated. Or do you want to replace text in predicates?

fdb
User
Posts: 43
Joined: 01-Jul-2008
# Posted on: 14-Sep-2010 11:02:06   

Both if possible! wink If replacing text in predicates is not possible, then insert and update is better than nothing! wink

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 14-Sep-2010 16:42:37   

Why do you need to do this ? This may help us to understand what your actual issue is, and how to solve it.

Matt

fdb
User
Posts: 43
Joined: 01-Jul-2008
# Posted on: 15-Sep-2010 17:04:22   

It's a request from my manager. We have a lot of users in more than 70 sites which are using our windows applications for data entry and reporting. Our users have different keyboard layouts and some of them use some characters for data entry that causes some issues in our reports and text searches. They are using different languages for data entry. For example some of them are using Arabic keyboard layouts and other users are using Persian keyboard layouts. In these layouts there are characters with the same visual shape and different ASCII codes. The same is true for European keyboard layouts.

I'm looking for a method to replace invalid characters with standard characters. I need to change these characters just before the execution of the LLBL generated SQL command.

Can I do this conversions inside generated DataAdapterClass? Can I change LLBL run-time DLLs and add this conversion inside LLBL run-time libraries? I have downloaded RuntimeLibraries_Source_07022010.zip from the customers area. Is it possible to change OracleDQE source codes and add this conversions?

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 15-Sep-2010 17:20:09   

I always build bilingual database applications (English & Arabic). IMHO, you should never change the characters entered by users. All you can do is to use the appropriate collation for each deployed database.