TGet Question for Unicode??

TGet Question for Unicode??

Postby richard-service » Fri Jul 15, 2016 11:25 am

Hi
Look my video http://www.fivetech.com.tw/downloads/Video_2016-07-15_093025.wmv
Now, I move DBFs to MySQL with Utf8 and Unicode.
I found I can't input more character that just only 1 character( English or Chinese ), This PRG code is Offer and 21 fields Table
I use these code
Code: Select all  Expand view

DATA oOFFER_NO
DATA oOFFER_NM
DATA ......

REDEFINE GET ::oOFFER_NO   VAR ::oDB:OFFER_NO   ID 101 OF ::oDlg UPDATE
REDEFINE GET ::oOFFER_NM   VAR ::oDB:OFFER_NM   ID 102 OF ::oDlg UPDATE
REDEFINE GET ..........
 

Very strange. I have a MEMO GET object can input more Character

But I use these code and work fine.
Code: Select all  Expand view

DATA oOFFER_NO, cOFFER_NO  AS CHARACTER INIT SPACE(10)
DATA oOFFER_NM, cOFFER_NM  AS CHARACTER INIT SPACE(50)
DATA ......

REDEFINE GET ::oOFFER_NO   VAR ::cOFFER_NO   ID 101 OF ::oDlg UPDATE
REDEFINE GET ::oOFFER_NM   VAR ::cOFFER_NM   ID 102 OF ::oDlg UPDATE
REDEFINE GET .........
 


I have small 10 Prgs, these prgs have 10 tables only two fields. I use ::oDB:FieldName work fine no problem.

I just test, if I remove FW_SetUniCode(.T.), VAR ::oDB:OFFER_NO work fine. Look it http://www.fivetech.com.tw/downloads/Video_2016-07-15_202705.wmv

Now, I look it and change my code below: http://forums.fivetechsupport.com/viewtopic.php?f=3&t=32675
Code: Select all  Expand view

REDEFINE GET ::oOFFER_NO   VAR ::oDB:OFFER_NO   ID 101 OF ::oDlg UPDATE LIMITBYCHARS .t.
REDEFINE GET ::oOFFER_NM   VAR ::oDB:OFFER_NM   ID 102 OF ::oDlg UPDATE LIMITBYCHARS .t.
 


I can input more character. but when I move data in XBrowse, TGet not show data. How to solve it? http://www.fivetech.com.tw/downloads/Video_2016-07-16_105154.wmv
Code: Select all  Expand view

//---------------------------------------------------------------------------//
METHOD DisplayBrw() CLASS TOfferMsf

   ::DisplayData()

RETURN NIL
//---------------------------------------------------------------------------//
METHOD DisplayData() CLASS TOfferMsf

   ::LoadData()
   ::RefreshData()

RETURN NIL
/----------------------------------------------------------------------------//
METHOD LoadData( lNew ) CLASS TOfferMsf

   DEFAULT lNew := .f.

   IF lNew
      ::oDB:Blank()
   ELSE
      ::oDB:Load()
   ENDIF

RETURN NIL
//----------------------------------------------------------------------------//
METHOD RefreshData() CLASS TOfferMsf

   Dr_Refresh( ::oDlg, { "TGET", "TMultiGET" } )
   Dr_GetRefresh( ::oDlg )

RETURN NIL
 


I want First video function, but I can't input more words.
Last video solve input problem. but lost I want function.
Please compare First video and Last video.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 95 guests