I am using dummy tables in my software to receive results from various sql queries (written by users, programmers…) without knowing what type of data they are using in queries
Everything is working fine until I use OLE with Adobe PDF Viewer.
Below is an example of simple code illustrating the problem (piece of code)
Database: PostgreSQL, Driver: ODBC, Clarion 6.3
! winapi function declaration
MAP
MODULE(‘WinAPI’)
GetLocaleInfo(LONG,LONG,*CSTRING,*ULONG),SIGNED,PASCAL,RAW,NAME(‘GetLocaleInfoA’)
END
END
! table declaration and variables
Loc:Length ULONG(2)
Loc:Parameter CSTRING(255)
LOCALE_USER_DEFAULT EQUATE(00000400h)
LOCALE_SDECIMAL EQUATE(0000000Eh)
dummy_table FILE,DRIVER(‘ODBC’,‘/NESTING=TRUE /VERIFYVIASELECT=TRUE’),OWNER(Glo:Owner),NAME(‘g.dummy_table’),PRE(dum_tab),CREATE,BINDABLE,THREAD
Record RECORD,PRE()
field_str STRING(100),NAME(‘field_str’)
End
End
CODE
! API FUNCTION - RETURNS DECIMAL SIGN FROM WINDOWS REGIONAL SETTINGS
! TO SHOW WHAT IS MY DECIMAL SIGN IN WINDOWS
S# = GetLocaleInfo(LOCALE_USER_DEFAULT,LOCALE_SDECIMAL,Loc:Parameter,Loc:Length)
Message(Loc:Parameter) ! returns: , → (comma)
CheckOpen(dummy_table,1) ! create when needed and open
dummy_table{Prop:SQL} = ‘select 1.23’
Next(dummy_table)
Num$ = clip(dum_tab:field_str)
Message(clip(dum_tab:field_str)&‘|’&Num$)
! returns 1.23 (dot)
! 1.23 (dot)
! A turning point that changes the behavior of the program
! It can be placed on another window, in another thread - it doesn’t matter
! “Listen all of y’all it’s a sabotage” ![]()
?OlePDF{Prop:Create} = ‘AcroPDF.PDF.1’
?OlePDF{PROP:DoVerb} = -4
! nothing has changed in Windows settings: still , → (comma)
S# = GetLocaleInfo(LOCALE_USER_DEFAULT,LOCALE_SDECIMAL,Loc:Parameter,Loc:Length)
Message(Loc:Parameter)
dummy_table{Prop:SQL} = ‘select 1.23’
Next(dummy_table)
Num$ = clip(dum_tab:field_str)
Message(clip(dum_tab:field_str)&‘|’&Num$)
! returns 1,23 → comma not dot
! 1 → without decimal places ![]()
Why is this convert dot into comma? I want a numeric value with decimal places. What do I need to do to restore the program’s previous behavior? (Deactivate OLE does not working, Closing window with activex too…)