VFP DBF Field Type ?

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 2061
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

VFP DBF Field Type ?

Post by AUGE_OHR »

hi,

i got this VFP DBF but how to show it in BROWSE :?:
VFP_IT.JPG
VFP_IT.JPG (83.55 KiB) Viewed 1963 times


it have "more" Field Type than Cl*pper ... how to handle it :idea:
hbwfnt_2020_09_16_001.zip
(1.47 KiB) Downloaded 127 times
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2061
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: VFP DBF Field Type ?

Post by AUGE_OHR »

hi,

i try to work with TIMESTAMP Field but how to "convert" :idea:

it is not a Number or String
Error BASE/1099 Argument error STR Parameter : [ 1] = T t"2019-01-15 22:44:28.999"
Error BASE/1100 Argument error TRIM Parameter : [ 1] = T t"2019-01-15 22:44:28.999"
have fun
Jimmy
User avatar
salamandra
Posts: 311
Joined: Thu Jul 31, 2008 8:33 pm
DBs Used: DBF, MySQL, SQL
Location: Brazil

Re: VFP DBF Field Type ?

Post by salamandra »

Hi Jimmy,
AUGE_OHR wrote: Fri Sep 18, 2020 11:08 pm hi,

i got this VFP DBF but how to show it in BROWSE :?:
VFP_IT.JPG

it have "more" Field Type than Cl*pper ... how to handle it :idea:
hbwfnt_2020_09_16_001.zip


This is the DBF stru ...

03.JPG
03.JPG (62.66 KiB) Viewed 1951 times

VFP field types
01.JPG
01.JPG (91.5 KiB) Viewed 1951 times

I think there it is not problem to browse...
I use VFP to create and modify DBF files and have not any problem to browse or other operations


Best regards,


Salamandra, Brazil
There is one time in which is crucial awakening. That time is now. ( Buddha )
User avatar
AUGE_OHR
Posts: 2061
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: VFP DBF Field Type ?

Post by AUGE_OHR »

hi,
salamandra wrote: Sat Sep 19, 2020 1:02 am I think there it is not problem to browse...
I use VFP to create and modify DBF files and have not any problem to browse or other operations
where are those Snapshot come from :?:

---

found

Code: Select all

hb_TSToStr()
hb_StrToTS()
and also

Code: Select all

hb_TSToUTC()
---

to show TimeStamp (?) in BROWSE i have remove DUPE Lines 608-650 in c:\hmg.3.4.4\SOURCE\H_BROWSE.PRG
as my Snapshot of BROWSE show 'Nil' i add missing Type instead

Code: Select all

   elseIf cTempType == 'N' .OR. cTempType == 'I' // add "I"nteger
     ...
   elseIf cTempType == 'T'
     aadd ( aTemp , hb_TSToStr ( &cTemp, .T. ) )
   elseIf cTempType == '@'
     aadd ( aTemp , TransForm ( RTrim( hb_ValToStr ( &cTemp ) ) , dim [j] ) )
   Else
     aadd ( aTemp , 'Nil' )
   EndIf     
now BROWSE does show Date + Time :D
i´m not sure about Type "T" or "@" ...

---

while i want to edit Type TimeStamp i have to change my Code
but while i use a TEXTBOX i have to enhance c:\hmg.3.4.4\SOURCE\h_controlmisc.prg

Code: Select all

523    case T == "TEXT" .or. T == "EDIT" .or. T == "CHARMASKTEXT"  .or. T == "RICHEDIT"

        if t == "CHARMASKTEXT"
           ...
        Else
if valtype ( value ) == 'T' .or. valtype ( value ) == '@'
            SetWindowText ( c , hb_TSToStr (value) )
ELSE
            SetWindowText ( c , RTRIM(value) )
ENDIF
        endif 
this seems to work now in HBFM but it will only work if HMG LIB also recognize Type "T" or "@"

perhaps i use wrong Control for TimeStamp. please help if i´m on wrong Way
have fun
Jimmy
User avatar
salamandra
Posts: 311
Joined: Thu Jul 31, 2008 8:33 pm
DBs Used: DBF, MySQL, SQL
Location: Brazil

Re: VFP DBF Field Type ?

Post by salamandra »

Hi Jimmy,
where are those Snapshot come from :?:

Visual FoxPro 9, modify stru screen.



Regards,


Salamandra, Brazil
There is one time in which is crucial awakening. That time is now. ( Buddha )
User avatar
AUGE_OHR
Posts: 2061
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: VFP DBF Field Type ?

Post by AUGE_OHR »

hi,
salamandra wrote: Sat Sep 19, 2020 12:55 pm Visual FoxPro 9, modify stru screen.
Ok, but what about HMG :?:
i understand that Cl*pper only have Type "CMNDL" but harbour does support "more" Type-

a i saw MiniGUI Extended Version seems to support "more" Types.
i have try to modify H_BROWSE.PRG and h_controlmisc.prg and it work :D

---

when go to https://github.com/HMG-Official/HMG it seems i can upload new Files :o
HMG_Github.JPG
HMG_Github.JPG (24.91 KiB) Viewed 1863 times
but i don´t want to upload new files before asking what is the rule :?:
have fun
Jimmy
User avatar
salamandra
Posts: 311
Joined: Thu Jul 31, 2008 8:33 pm
DBs Used: DBF, MySQL, SQL
Location: Brazil

Re: VFP DBF Field Type ?

Post by salamandra »

Hi Jimmy,

AUGE_OHR wrote: Sat Sep 19, 2020 8:20 pm hi,
salamandra wrote: Sat Sep 19, 2020 12:55 pm Visual FoxPro 9, modify stru screen.
Ok, but what about HMG :?:
i understand that Cl*pper only have Type "CMNDL" but harbour does support "more" Type-

a i saw MiniGUI Extended Version seems to support "more" Types.
i have try to modify H_BROWSE.PRG and h_controlmisc.prg and it work :D

---

when go to https://github.com/HMG-Official/HMG it seems i can upload new Files :o
HMG_Github.JPG
but i don´t want to upload new files before asking what is the rule :?:
About all the Field Types supported by Harbour (old and new ones), please take a look at this post: https://groups.google.com/g/harbour-users/c/e9OSB9RU4dU at harbour-users.
And about to upload your job to GitHub, I think it,s a nice ideia.

Best regards,

Salamandra, Brazil
There is one time in which is crucial awakening. That time is now. ( Buddha )
User avatar
AUGE_OHR
Posts: 2061
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: VFP DBF Field Type ?

Post by AUGE_OHR »

hi,

thx for Link
i have read that Thread using Field_Type() instead of DbStruct()

---

i wonder that i have write Access on https://github.com/HMG-Official/HMG
i´m willing to integrate new Code into Source but who to ask if i´m allowed :?:
have fun
Jimmy
Post Reply