PxPlus User Forum

Twitter Twitter Twitter

Recent Posts

Pages: 1 ... 8 9 [10]
91
Nomads / Re: Convert NOMADS file to XML (need IOLIST)
« Last post by Stéphane Devouard on March 14, 2024, 02:20:12 AM »
Phil


When using the SVN interface from PxPlus, programs and Nomads libraries are converted to text when you commit changes to the repo. Each library becomes a folder and each Nomads object (panels, queries, file maintenance, menus) is converted to a text file.
The format of the exported file is not XML, it’s more like an INI file format
I believe the conversion program can be called. You’d need to explore the *plus/proj folder to find out.


Hope this helps
92
Nomads / Re: Convert NOMADS file to XML (need IOLIST)
« Last post by Mike King on March 13, 2024, 05:39:27 PM »
Actually you can get the IOLIST for the Nomads screen definition file from the Nomads object.

It can be accessed by IOL=%nomads'_lib_iol$

93
Nomads / Re: Convert NOMADS file to XML (need IOLIST)
« Last post by pwhirley on March 13, 2024, 03:37:34 PM »
Thanks Loren!  That looks familiar. - Phil
94
Nomads / Re: Convert NOMADS file to XML (need IOLIST)
« Last post by Loren Doornek on March 13, 2024, 03:32:35 PM »
Search for "IOL=" in *winproc.dsp.  It is most likely line 8010 that has the IOList.

8010 IOLIST _obj_nme$,_obj_c,_obj_l,_obj_w,_obj_h,_obj_type$,init_text$,init_val$,_obj_tab,_obj_def$,_obj_dsp$,_obj_fcs$,_obj_sel$,_obj_msg$,_obj_hlp$,_obj_attr$,_obj_idx$,_obj_hotkey$,_obj_qry$,_obj_sec$,_obj_sts$,_obj_grp$,_obj_null$,_obj_tag$,_obj_tbl$,_obj_inp$,_obj_out$,_obj_valid$,_obj_class$,_obj_tip$,_obj_orig$,_obj_font$,_obj_color$,_obj_listbox_type$,_obj_sep$,_obj_scratch$,_obj_popup$,_obj_sizing$,_obj_logic1$,_obj_logic2$,_obj_popup_logic$,_obj_qry_bitmap$,_obj_qry_width,_obj_qry_tip$,_obj_qry_attr$,_obj_extension$,_obj_demand$,_obj_demand_logic$,_obj_background_logic$,_obj_persistence$,_obj_notes$,_obj_tbl_len,_obj_tvline_color$,_obj_autosz_width$,_obj_autosz_height$,_obj_automation_text$,_obj_hilight_colors$,_obj_props$,_obj_visual_class$
95
Nomads / Convert NOMADS file to XML (need IOLIST)
« Last post by pwhirley on March 13, 2024, 03:13:51 PM »
I am writing a utility to convert PVXPlus program and library files to text so that Beyond Compare (a compare utility from Scooter Software) can easily spot changes.  Converting the program to text is easy and done.  I've decided to convert the NOMADS library files to XML.  I can do this with made-up column names (i.e. Field1, Field2, etc), but I'd rather have the meaningful names that go with the columns.

Have any of you already written a conversion of NOMADS library files to XML that you'd be willing to share?

Where would I find the IOLIST for a NOMADS library file?

Thanks - Phil

P.S. I'll be happy to share my conversion program and the Beyond Compare configuration to anyone interested.  It's quite useful.
96
Programming / Re: accessing mySQL-DB
« Last post by EVa on March 13, 2024, 11:57:13 AM »
I'm running CentOS8, my MariaDB library version is:

libmariadb.so.3-3.1.11-2.el8_3.x86_64

Your program codes works without an error in v20.10 (64-bit).
97
Programming / accessing mySQL-DB
« Last post by Thomas Bock on March 13, 2024, 11:19:19 AM »
We encounter problems with a newer version of libmariadb.so.3
PxPlus 20.10 is installed on a Linux server.
The program below runs with version 3.1.13 on a Linux server. With version 3.2.7 the result is empty and msg(-1) returns "MYSQL:0:".
Code: [Select]
begin
dbOpt$ = "SERVER=my_server;USER=my_account;PASSWORD=my_password;DATETIME_CONVERT=N"
dbName$ = "[MYSQL]my_database;;"
channel = hfn
open (channel, OPT = dbOpt$, tim = 10) dbName$
query$ = "SELECT * FROM `myTable` limit 1"
write record (channel)query$
gosub buildPVXIOList
repeat
read record(channel,err=*next)sqlResultItem$
if tcb(2) {
print msg(err)
print msg(-1)
break
}
print ++c,": ",sqlResultItem$
until 0
close( channel)
end
buildPVXIOList:
local sqlIOL$    = ken(channel, ind = 3)
local pvxIOL$    = "IOLIST "
local separator$ = $$
local items      = pos(";" = sqlIOL$, 1, 0)
local counter    = 0
local virtual    = 0
repeat
fieldDefinition$ = arg(sqlIOL$, counter + 1, ";")
read data from fieldDefinition$, sep = "," to fieldName$, fieldType$
fieldName$  = tbl(nul(fieldName$), fieldName$, "_VIRTUAL" + str(++virtual))
pvxIOL$    += separator$ + fieldName$
if (mid(fieldType$, 1, 3) = "CHR") or (fieldType$ = "DATE") {
pvxIOL$ += "$"
}
separator$ = ","
until (++counter > items)
pvxIOL$ = sub(pvxIOL$, "-", "_")
dim sqlResultItem$ : cpl(pvxIOL$)
return

What needs to be done in order to work with then newer version?
98
Programming / Re: creating UTF-8 text file
« Last post by Alain Stucki on March 10, 2024, 04:55:22 PM »
 :)
Hello
Thank you sooo much for your fast reply. This works great!
99
Programming / Re: creating UTF-8 text file
« Last post by Allen Miglore on March 10, 2024, 10:43:05 AM »
100
Programming / creating UTF-8 text file
« Last post by Alain Stucki on March 10, 2024, 05:19:57 AM »
Hello. I'm trying to get our product data into a CSV-file and use this to import our data into a webshop. So I OPEN LOCK (7)"datafile.csv" and then I PRINT the requried data into that csv-file.

That works fine. I can open the file with Windows Editor and everything looks good. But when I import the file into the webshop, the accented characters look weird.So the problem is the codepage . The shop requires UTF-8 file format. And the file my little program has created is ANSI. So my questions is: How can I create UTF-8 text files (no BOM) or would I need to use a CLI tool to convert the file from ANSI to UTF-8?

Best regards
Alain Stucki
Pages: 1 ... 8 9 [10]