1. PRASHANT NIRGUN
  2. PowerBuilder
  3. Saturday, 30 March 2019 19:05 PM UTC

Hi

This is Prashant here I am facing probem with unicode numeric datatype. Which I believe could be for numeric values unicode \u and I set Edit mask Format = ###,###. If I removed Edit Mask and allow it return garbage value.

If fails to enter numeric and date datatype to access from datawindow. 

Using following versions

Windows : 7 64 Bit

PB 12.5.2 Build 5583 Classical

MySQL 5.5.38, 

MySQL ODBC 5.3 UNICODE Driver.

Keyboard ; India (US)

Connection String 

dbms = ODBC
dbparm = Connectstring='DRIVER=MySQL ODBC 5.3 UNICODE Driver;UID=root;
PWD=xxx; Database=Veg10;Server=localhost;OPTION=4096',DelimitIdentifier='No',OJSyntax='ANSI';
ConnectOption='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPROMPT'


Is it a compilation or dll which is not unicode. Totally frustated wiith the numeric and datatype values handling. Kindly help feeling sucked.

Thanks in advance.

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 26 January 2023 18:35 PM UTC
  2. PowerBuilder
  3. # 1

Hi,

Wow, this is almost 4 years old. Are you still having "the" problem?

The link you posted of your video is not working, it only works if you copy the text, but the link itself goes elsewhere.

Here is the corrected link https://www.awesomescreenshot.com/video/14291412?key=486180210b05e9abb29ce77dd5034acd

Even after watching the video, it's not clear to me what the problem is.

There's newer versions of MySql odbc drivers, maybe you could try with a newer driver.

Does your table have any funny columns with Mysql-specific datatypes? I know of one user who had problems using the 'year' datatype for example ...

regards,

MiguelL

Comment
  1. PRASHANT NIRGUN
  2. Friday, 27 January 2023 07:03 AM UTC
I tried out with Database MySQL 8.0.32 64 Bit, ODBC Driver 8.0.32 32 Bit, PB 2019 R2 Windows 11 64 Bit. There is no newer version available its all upto date. Let me quote my problem is : I select language called Marathi now my MySQL database is supporting UTF charset I inserted few records which is shown in datawindow so it no issue with UTF on database side. When I enter numeric text in column who's datatype is int or decimal let say 55.90 and I move to other column ie losefocus it change to a strange value.



Some Observation if you used numeric pad it works smoothly if you go with 2nd row of numeric character of your keyboard it reproduce the same problem.
  1. Helpful
  1. Miguel Leeuwe
  2. Friday, 27 January 2023 07:16 AM UTC
Hi,

If it works correctly with the numeric keypad, then it really seems more like a Powerbuilder bug and probably nothing to do with the Mysql odbc driver.

I think you should report this as a bug on https://www.appeon.com/standardsupport/newbug

Maybe they'll tell you that they don't support Mysql and not give you much assistence though. Could you make a small sample application that uses for example a sqlAnywhere database? Or maybe you can even reproduce the problem without using any database at all. Just use a datawindow and insert some datarows.

Good luck!
  1. Helpful
There are no comments made yet.
PRASHANT NIRGUN Accepted Answer Pending Moderation
  1. Thursday, 26 January 2023 10:05 AM UTC
  2. PowerBuilder
  3. # 2

I changed windows  language Input to Marathi and try to enter the values into amount column here is trace log with this post

Database MySQL 8.0.32 64 Bit, ODBC Driver 8.0.32 32 Bit, PB 2019 R2 Windows 11 64 Bit.

Feel frustrated as I thought once I update to Win & PB it will work smoothly, It didn't work with Edit Mask also can any one help to solved this, I have to plan appointment for PB developer if this didn't solved in time I will be in great trouble.

CREATE TABLE `customer` (
`id` int NOT NULL AUTO_INCREMENT,
`customer_name` varchar(100) NOT NULL,
`amount` decimal(12,2) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `test_db`.`customer`
(`id`, `customer_name`,`amount`)
VALUES (1,'ABC',100),
(2,'प्रशांत निर्गुण',200),
(3,'तुषार ',300);

 I recorded the screen you can view its behavior in video here is the link https://www.awesomescreenshot.com/video/14291412?key=486180210b05e9abb29ce77dd5034acd

/ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * / / * 2 6 - 0 1 - 2 0 2 3 1 5 : 1 9 * / / * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * / ( 0 3 3 D 5 C 1 0 ) : L O G I N : ( 3 7 . 1 1 6 M S / 3 7 . 1 1 6 M S ) ( 0 3 3 D 5 C 1 0 ) : C O N N E C T T O T R A C E O D B C : ( 0 3 3 D 5 C 1 0 ) : S E R V E R = l o c a l h o s t v i a T C P / I P ( 0 3 3 D 5 C 1 0 ) : D B P A R M = C o n n e c t S t r i n g = ' D S N = t e s t _ d b ; U I D = r o o t ; P W D = < * * * * * * > ' ( 0 . 0 1 5 M S / 3 7 . 1 3 1 M S ) ( 0 3 3 D 5 C 1 0 ) : P R E P A R E : ( 0 . 0 0 0 M S / 3 7 . 1 3 1 M S ) ( 0 3 3 D 5 C 1 0 ) : B E G I N T R A N S A C T I O N : ( 0 . 4 0 4 M S / 3 7 . 5 3 5 M S ) ( 0 3 3 D 5 C 1 0 ) : P R E P A R E : ( 0 3 3 D 5 C 1 0 ) : S E L E C T c u s t o m e r . i d , c u s t o m e r . c u s t o m e r _ n a m e , c u s t o m e r . a m o u n t F R O M c u s t o m e r O R D E R B Y c u s t o m e r . i d A S C ( 1 . 6 1 0 M S / 3 9 . 1 4 5 M S ) ( 0 3 3 D 5 C 1 0 ) : B I N D S E L E C T O U T P U T B U F F E R ( D a t a W i n d o w ) : ( 0 . 0 6 3 M S / 3 9 . 2 0 8 M S ) ( 0 3 3 D 5 C 1 0 ) : , l e n = 8 0 , t y p e = L O N G , p b t = 2 2 , d b t = 0 , c t = 0 , p r e c = 0 , s c a l e = 0 ( 0 3 3 D 5 C 1 0 ) : , l e n = 1 0 1 , t y p e = C H A R , p b t = 1 , d b t = 0 , c t = 0 , p r e c = 0 , s c a l e = 0 ( 0 3 3 D 5 C 1 0 ) : , l e n = 1 6 0 , t y p e = D E C I M A L , p b t = 4 , d b t = 0 , c t = 0 , p r e c = 0 , s c a l e = 2 ( 0 3 3 D 5 C 1 0 ) : E X E C U T E : ( 0 . 0 0 1 M S / 3 9 . 2 0 9 M S ) ( 0 3 3 D 5 C 1 0 ) : F E T C H N E X T : ( 0 . 0 6 3 M S / 3 9 . 2 7 2 M S ) ( 0 3 3 D 5 C 1 0 ) : C O L U M N = 1 C O L U M N = A B C C O L U M N = 1 0 0 . 0 0 ( 0 3 3 D 5 C 1 0 ) : F E T C H N E X T : ( 0 . 0 2 3 M S / 3 9 . 2 9 5 M S ) ( 0 3 3 D 5 C 1 0 ) : C O L U M N = 2 C O L U M N = * M 0 6 >  $ ( ? 0 M  A # C O L U M N = 2 0 0 . 0 0 ( 0 3 3 D 5 C 1 0 ) : F E T C H N E X T : ( 0 . 0 1 9 M S / 3 9 . 3 1 4 M S ) ( 0 3 3 D 5 C 1 0 ) : C O L U M N = 3 C O L U M N = $ A 7 > 0 C O L U M N = 3 0 0 . 0 0 ( 0 3 3 D 5 C 1 0 ) : F E T C H N E X T : ( 0 . 0 0 4 M S / 3 9 . 3 1 8 M S ) ( 0 3 3 D 5 C 1 0 ) : C O L U M N = 4 C O L U M N = 8 K K 9  0 C O L U M N = 1 2 0 . 0 0 ( 0 3 3 D 5 C 1 0 ) : F E T C H N E X T : ( 0 . 0 6 6 M S / 3 9 . 3 8 4 M S ) ( 0 3 3 D 5 C 1 0 ) : * * * D B I _ F E T C H E N D * * * ( r c 1 0 0 ) ( 0 3 3 D 5 C 1 0 ) : P R E P A R E W I T H B I N D V A R I A B L E S : ( 0 3 3 D 5 C 1 0 ) : U P D A T E c u s t o m e r S E T a m o u n t = ? W H E R E i d = ? A N D c u s t o m e r _ n a m e = ? A N D a m o u n t = ? ( 0 . 4 7 7 M S / 3 9 . 8 6 1 M S ) ( 0 3 3 D 5 C 1 0 ) : D E C I M A L L e n g t h = 0 I D = : 1 * 2 6 2 4 2 9 3 . 0 0 * ( 0 3 3 D 5 C 1 0 ) : L O N G L e n g t h = 0 I D = : 2 ( 0 3 3 D 5 C 1 0 ) : V C H A R L e n g t h = 6 I D = : 3 * 8 K K 9  0 * ( 0 3 3 D 5 C 1 0 ) : D E C I M A L L e n g t h = 0 I D = : 4 * 1 2 0 . 0 0 * ( 0 . 0 1 7 M S / 3 9 . 8 7 8 M S ) ( 0 3 3 D 5 C 1 0 ) : E X E C U T E : ( 4 . 1 7 4 M S / 4 4 . 0 5 2 M S ) ( 0 3 3 D 5 C 1 0 ) : G E T A F F E C T E D R O W S : ( 0 . 0 0 3 M S / 4 4 . 0 5 5 M S ) ( 0 3 3 D 5 C 1 0 ) : ^ 1 R o w s A f f e c t e d ( 0 3 3 D 5 C 1 0 ) : C O M M I T : ( 2 . 8 2 1 M S / 4 6 . 8 7 6 M S ) ( 0 3 3 D 5 C 1 0 ) : G E T A F F E C T E D R O W S : ( 0 . 0 0 0 M S / 4 6 . 8 7 6 M S ) ( 0 3 3 D 5 C 1 0 ) : ^ 0 R o w s A f f e c t e d ( 0 3 3 D 5 C 1 0 ) : B E G I N T R A N S A C T I O N : ( 0 . 2 5 9 M S / 4 7 . 1 3 5 M S ) ( 0 3 3 D 5 C 1 0 ) : C O M M I T : ( 0 . 8 4 4 M S / 4 7 . 9 7 9 M S ) ( 0 3 3 D 5 C 1 0 ) : D I S C O N N E C T : ( 0 . 4 2 4 M S / 4 8 . 4 0 3 M S ) ( 0 3 3 D 5 C 1 0 ) : S H U T D O W N D A T A B A S E I N T E R F A C E : ( 0 . 0 0 1 M S / 4 8 . 4 0 4 M S ) / * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * / / * 2 6 - 0 1 - 2 0 2 3 1 5 : 2 9 * / / * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * / ( 0 3 3 D 5 0 0 8 ) : L O G I N : ( 1 9 . 8 2 0 M S / 1 9 . 8 2 0 M S ) ( 0 3 3 D 5 0 0 8 ) : C O N N E C T T O T R A C E O D B C : ( 0 3 3 D 5 0 0 8 ) : S E R V E R = l o c a l h o s t v i a T C P / I P ( 0 3 3 D 5 0 0 8 ) : D B P A R M = C o n n e c t S t r i n g = ' D S N = t e s t _ d b ; U I D = r o o t ; P W D = < * * * * * * > ' ( 0 . 0 1 2 M S / 1 9 . 8 3 2 M S ) ( 0 3 3 D 5 0 0 8 ) : P R E P A R E : ( 0 . 0 0 0 M S / 1 9 . 8 3 2 M S ) ( 0 3 3 D 5 0 0 8 ) : B E G I N T R A N S A C T I O N : ( 0 . 4 2 9 M S / 2 0 . 2 6 1 M S ) ( 0 3 3 D 5 0 0 8 ) : P R E P A R E : ( 0 3 3 D 5 0 0 8 ) : S E L E C T c u s t o m e r . i d , c u s t o m e r . c u s t o m e r _ n a m e , c u s t o m e r . a m o u n t F R O M c u s t o m e r O R D E R B Y c u s t o m e r . i d A S C ( 1 . 2 4 4 M S / 2 1 . 5 0 5 M S ) ( 0 3 3 D 5 0 0 8 ) : B I N D S E L E C T O U T P U T B U F F E R ( D a t a W i n d o w ) : ( 0 . 0 5 4 M S / 2 1 . 5 5 9 M S ) ( 0 3 3 D 5 0 0 8 ) : , l e n = 8 0 , t y p e = L O N G , p b t = 2 2 , d b t = 0 , c t = 0 , p r e c = 0 , s c a l e = 0 ( 0 3 3 D 5 0 0 8 ) : , l e n = 1 0 1 , t y p e = C H A R , p b t = 1 , d b t = 0 , c t = 0 , p r e c = 0 , s c a l e = 0 ( 0 3 3 D 5 0 0 8 ) : , l e n = 1 6 0 , t y p e = D E C I M A L , p b t = 4 , d b t = 0 , c t = 0 , p r e c = 0 , s c a l e = 2 ( 0 3 3 D 5 0 0 8 ) : E X E C U T E : ( 0 . 0 0 0 M S / 2 1 . 5 5 9 M S ) ( 0 3 3 D 5 0 0 8 ) : F E T C H N E X T : ( 0 . 0 3 5 M S / 2 1 . 5 9 4 M S ) ( 0 3 3 D 5 0 0 8 ) : C O L U M N = 1 C O L U M N = A B C C O L U M N = 1 0 0 . 0 0 ( 0 3 3 D 5 0 0 8 ) : F E T C H N E X T : ( 0 . 0 0 2 M S / 2 1 . 5 9 6 M S ) ( 0 3 3 D 5 0 0 8 ) : C O L U M N = 2 C O L U M N = * M 0 6 >  $ ( ? 0 M  A # C O L U M N = 2 0 0 . 0 0 ( 0 3 3 D 5 0 0 8 ) : F E T C H N E X T : ( 0 . 0 0 1 M S / 2 1 . 5 9 7 M S ) ( 0 3 3 D 5 0 0 8 ) : C O L U M N = 3 C O L U M N = $ A 7 > 0 C O L U M N = 3 0 0 . 0 0 ( 0 3 3 D 5 0 0 8 ) : F E T C H N E X T : ( 0 . 0 0 2 M S / 2 1 . 5 9 9 M S ) ( 0 3 3 D 5 0 0 8 ) : C O L U M N = 4 C O L U M N = 8 K K 9  0 C O L U M N = 2 6 2 4 2 9 3 . 0 0 ( 0 3 3 D 5 0 0 8 ) : F E T C H N E X T : ( 0 . 0 5 2 M S / 2 1 . 6 5 1 M S ) ( 0 3 3 D 5 0 0 8 ) : * * * D B I _ F E T C H E N D * * * ( r c 1 0 0 ) ( 0 3 3 D 5 0 0 8 ) : P R E P A R E W I T H B I N D V A R I A B L E S : ( 0 3 3 D 5 0 0 8 ) : I N S E R T I N T O c u s t o m e r ( i d , c u s t o m e r _ n a m e , a m o u n t ) V A L U E S ( ? , ? , ? ) ( 0 . 4 3 8 M S / 2 2 . 0 8 9 M S ) ( 0 3 3 D 5 0 0 8 ) : L O N G L e n g t h = 0 I D = : 1 ( 0 3 3 D 5 0 0 8 ) : V C H A R L e n g t h = 3 I D = : 2 * , , , * ( 0 3 3 D 5 0 0 8 ) : D E C I M A L L e n g t h = 0 I D = : 3 * 2 6 2 3 1 7 2 . 0 0 * ( 0 . 0 1 5 M S / 2 2 . 1 0 4 M S ) ( 0 3 3 D 5 0 0 8 ) : E X E C U T E : ( 0 . 5 5 1 M S / 2 2 . 6 5 5 M S ) ( 0 3 3 D 5 0 0 8 ) : C O M M I T : ( 2 . 1 1 7 M S / 2 4 . 7 7 2 M S ) ( 0 3 3 D 5 0 0 8 ) : G E T A F F E C T E D R O W S : ( 0 . 0 0 0 M S / 2 4 . 7 7 2 M S ) ( 0 3 3 D 5 0 0 8 ) : ^ 0 R o w s A f f e c t e d ( 0 3 3 D 5 0 0 8 ) : B E G I N T R A N S A C T I O N : ( 0 . 2 3 9 M S / 2 5 . 0 1 1 M S ) ( 0 3 3 D 5 0 0 8 ) : C O M M I T : ( 0 . 7 0 5 M S / 2 5 . 7 1 6 M S ) ( 0 3 3 D 5 0 0 8 ) : D I S C O N N E C T : ( 0 . 4 9 4 M S / 2 6 . 2 1 0 M S ) ( 0 3 3 D 5 0 0 8 ) : S H U T D O W N D A T A B A S E I N T E R F A C E : ( 0 . 0 0 1 M S / 2 6 . 2 1 1 M S )

 

Attachments (1)
Comment
  1. PRASHANT NIRGUN
  2. Thursday, 26 January 2023 17:47 PM UTC
No this was old thread so we recently upgraded to PB2019 so I reopen the thread I think you just missed 2nd line of my last post where I mentioned all versions. I thought It was bcaz of old version but with PB2019 it should work right ?
  1. Helpful
  1. PRASHANT NIRGUN
  2. Thursday, 26 January 2023 17:48 PM UTC
Should I close it and reopen new one with will it catch the attentioned
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Thursday, 26 January 2023 19:27 PM UTC
That’s great but the issue is MySQL not supported database and Windows 11 supported in PB 2022 so I am concerned at least some of the problems you encounter might be incompatibility. Anyway, do you have small test case reproducing the problem you could submit to our engineers?
  1. Helpful
There are no comments made yet.
PRASHANT NIRGUN Accepted Answer Pending Moderation
  1. Tuesday, 2 April 2019 04:26 AM UTC
  2. PowerBuilder
  3. # 3

I forgot to mention I am using Marathi (US) keyboard I set up 

Constant long LANG_MARATHI = 72221774

ActivateKeyboardLayout(LANG_MARATHI , KLF_REORDER)

please refer https://community.appeon.com/index.php/qna/q-a/pb-12-5-windows-controls-support-unicode-sle-ddlb-picture-button

Now the problem is error I am getting is at item change level I not yet commited the data. I just inserted row using dw_1.insertRow(0)
And I am trying to enter value in int or decimal(12,2) columns it pushes the wrong value. I can understand charset is for string columns.
I think U+XXXX is value dw is accepting and try to convert it to numeric equivalent value its converting \U to numeric value.

I try to set ActiveKeyboard Layout in Itemfocuschanged event to
ActivateKeyboardLayout(LANG_US_ENGLISH , KLF_REORDER) in choose case for numeric columns but it setitem wrong values.

Thanks for your reply
 
Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 1 April 2019 18:38 PM UTC
  2. PowerBuilder
  3. # 4

Hi Prashant;

   Unicode encoding typically refers to nChar, nVarChar, and nText based data types. All numeric data types are encoded neutrally (Int, Double, Real, Decimal, etc). However the DBMS needs to follow "ANSI Result Set" standards when returning a data stream so that the DB Client driver (in your ODBC) can parse the values out properly.

   I wonder if your issue is either in the MySQL ODBC driver or the way the data is handed over to the PB ODBC "Interface" DB driver. An ODBC DB buffer trace might be the the thing to do now to see exactly what is being returned to either the PB IDE or your App, as follows:

SQLCA.DBMS = "TRACE ODBC"

HTH

Regards ... Chris

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.