Recent posts

#31
General Announcements / Re: Forum Upgrade
Last post by James Zukowski - July 11, 2024, 03:04:52 PM
Is there a way to get something like the old singular "Unread Posts" button? With this new format, it seems I get to check the Alerts as well as the Updated Tops and Unread Posts under my avatar if I want to get all of the updates since the last time I checked.
#32
Programming / Re: Why use PVX?
Last post by nrh7 - July 11, 2024, 02:13:14 PM
Probably out of topic but I agree with this comment:

Cedric said "Also, it's hard to seduce young developers to join the team since PVXPLUS has an old school approach that's really different to all the other popular "web based" technologies.  There's not a lot of documentation or info about the language that makes it hard for them to learn."
-------------------------------------------
My story is that I was technically forced to learn PVX because the only one left in the company who knew PVX is about to retire, so technically PVX was my first programming language, I knew a very little about visual basic but only dealt with it doing macros inside excel sheets. with copy/pasted examples from the internet, something you can't really go with PVX.

Problem is the one who taught me know way less about PVX than I learned in a few weeks of diving in https://manual.pvxplus.com/. (of course, with the basics he taught me)

The manual is no "training material" at all, it gives examples but they're not really newbie/student friendly, it is what it is, just a manual as if I was trying to understand a car's manual, show's me how it works but doesn't make me a mechanic.

So the little I have learned by trial and error has been enough to make some tools our clients and THAT's precisely why I decided to stick with PVX, I was shown visual studio and python but I kind of like the simplicity of PVX even though I know it's a LOT MORE simple than what I know.

I would reeeally like to learn about android apps and iNomads, but right now I'm burned with trial and error/self teaching.

So! I finally decided to join the forums, maybe here I can get some tips make the most our of PVX.

But back to topic, it's kind of hard to learn PVX as your first programming language, HOWEVER I do find it very simple and quite amazing if used well.

Either way, I'm trying to get as many clients as I can and use PVX in them all, I don't find myself replacing it, instead learning more from it along the way.
#33
Programming / Question about reading a data ...
Last post by nrh7 - July 11, 2024, 01:50:39 PM
Hello team!

I'm having a little doubt in something I'm trying to do.

I have this small code:


02150 LIST_BOX LOAD ACCOUNTS.CTL,""
02190 LET CH1=HFN
02200 OPEN (CH1,IOL=*)"dta_ACCOUNTS"
02230 SELECT IOL=ACCOUNTS_IOL FROM (CH1),KNO=1
02261 LIST_BOX LOAD ACCOUNTS.CTL,0,STR(KEY)+SEP+ACCOUNTNUMBER$+SEP+ACCOUNTNAME$
02270 NEXT RECORD
02280 CLOSE (CH1)
02330 RETURN

I tried to run this code to load the listbox in order of account number hence the KNO=1, that worked well, BUT it's loading the listbox in alphanumeric manner since the account number is an string variable, like:

300
3100
315

Leaving the variable as string, is there a way to read the file as if it where numeric so that it sorts the data in numeric order when filling the listbox?

Like:
300
315
3100

Thanks a lot!
#34
Programming / check if sub program and entry...
Last post by Cedric - July 11, 2024, 10:39:41 AM
Good morning everyone,

I`m curious to know... Is there a way to just check if a subprogram and entry line exist, but not execute or load that program.

Just to explain my context, I want to check if the subprogram and entry line exist.  If it does, execute something and then call that subprogram and entry line.

I'm working on improving our grid loading routine to load faster though proplist and propvalue.  But in some case, I want to make sure the grid is loaded before exexuting a specific subroutine, but only if that subroutine exists since that subroutine may try to alter the grid.  That subroutine is in another program.

I could've use the LNO function, but it only works with the current loaded program.
#35
Programming / Re: Why use PVX?
Last post by Cedric - July 11, 2024, 10:29:04 AM
Thanks again for all the comments.  It looks I have some homework to do!  Just to be clear, we've been using Eclipse IDE since the plugin came out like 15 years ago and we've never used Nomads except for database/file management.  So yes, I feel that most of PVX effort in the last few years were to develop Nomads and Webster+ and I may be missing on these.  I've played a bit with them, but not enough to see the real potential I guess! 
I think that PVX lacks of tutorials and that's what makes it hard to learn.  All popular languages have tons of info on the web and everyone I know learns languages by following tutorials and/or examples.  I mean, I could watch a 15 minutes youtube video and could learn the basics of any language probably.

Some have mentioned hiring somebody coming from BBX... How old was that person?  I mean, I would be surprise someone less than 60 years old knows BBX?!  My old boss, the original founder of our company, came from a BBX background and discovered Providex in early 2000s. He's well over 60 years old though! ;)

We have used Java for Android mobile apps in the past, but we have now switched to Flutter which isn't perfect, but pretty good for what we do (and most importantly real cross plateform compatible).  But, my concern with a technology like Flutter is that it evolves too much.  There's frequent updates and a lot of obsolescence.  I'm not sure how many times we had issues after an update because of versions compatibility.  We tried React Native prior and it was way worst!   That's one thing I really like about PVX.  Our code is rarely broken because of an update.  That makes it easy to maintain and keep a stable software with low maintenance.

Again, thanks everyone!

#36
ODBC / Re: [OBD] CONNECT=
Last post by EVa - July 11, 2024, 03:26:16 AM
Are you using a 64-bit PxPlus (as you're using the 64-bit ODBC driver) ?
#37
ODBC / Re: Slow ODBC Query where SUBS...
Last post by bbssupport - July 11, 2024, 03:23:32 AM
FYI - same issue with something like:
LEFT JOIN 'INF09' ON INF31001+INF31002=INF09001
#38
ODBC / [OBD] CONNECT=
Last post by bbssupport - July 11, 2024, 01:52:49 AM
Having a problem using the OPT="CONNECT=" option when using OPEN [ODB] and trying to connect back to the PxPlus OBDC driver. It works fine with a DSN and the same connection string works with pxpsql.exe.

What am I doing wrong?

eg:
0010 LET CONNSTRING$="DRIVER={PxPlus® SQL ODBC Driver (64-bit)}; UID=A; PWD=B; DEBUG=1;Directory=D:\BBSCloud\BBSDev\DATA\DATA.BBS; Prefix=D:\BBSCloud\BBSDev\DATA\DATA.00,D:\BBSCloud\BBSDev\DATA\DATA.BBS,D:\BBSCloud\BBSDev\PROGS\PROGS.BBS; Company=00; LogFile=D:\BBSCloud\BBSDev\PXPSQLODBC.LOG; CacheSize=1024; DirtyReads=1; EnforceNULLDate=1; ReadOnly=1; SERVER=NotTheServer"
0020 OPEN (CHAN,OPT="CONNECT="+"'"+CONNSTRING$+"'")"[ODB]"

Returns:
IM002: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

I"ve tried all sorts of combinations around the CONNSTRING$ and cannot make it work.

However, the following command using the same connection string works perfectly.

"C:\PVX Plus Technologies\SQL ODBC Driver (64-bit)\pxpsql.exe" --connection-string "DRIVER={PxPlus® SQL ODBC Driver (64-bit)}; UID=A; PWD=B; DEBUG=1;Directory=D:\BBSCloud\BBSDev\DATA\DATA.BBS; Prefix=D:\BBSCloud\BBSDev\DATA\DATA.00,D:\BBSCloud\BBSDev\DATA\DATA.BBS,D:\BBSCloud\BBSDev\PROGS\PROGS.BBS; Company=00; LogFile=D:\BBSCloud\BBSDev\PXPSQLODBC.LOG; CacheSize=1024; DirtyReads=1; EnforceNULLDate=1; ReadOnly=1; SERVER=NotTheServer" "SELECT * FROM ARF12"
#39
ODBC / Slow ODBC Query where SUBSTR i...
Last post by bbssupport - July 11, 2024, 01:13:43 AM
The below query is very slow to execute (approx one row per second), as if it is reading the entire INF11M data file for each INF04M record. INF04001 contains the invoice number (1,6) and line number (7,3) and INF11001 is the invoice number which is the primary key of INF11M.

The only way we can see to join the headers (INF11M) to the lines (INF04M) is to use the SUBSTR function. Is there a better way?

SELECT * FROM 'INF04M' LEFT JOIN 'INF11M' INF11M ON INF11001=SUBSTR(INF04001,1,6)

Both files are KEYED files. INF11M has ~84,000 records.
#40
ODBC / Native SELECT vs ODBC Select
Last post by bbssupport - July 11, 2024, 01:06:42 AM
When joining tables, we have discovered a massive performance difference between using the native SELECT WITH command vs ODBC LEFT JOIN on native PxPlus files.

Attached are three test programs. You won't be able to run them without the data files or dictionary, but you'll be able to see what we are doing.

File INF31 has approximately 300,000 records, and the fields being restricted are not within a key so the entire file is being read. APF00 has 310 records, the field being joined on is the primary key of APF00.

With the native SELECT WITH, the process takes 10 minutes to return the results. With the pxpsql.exe command line utility, or the [OBD] tag to read the data via the ODBC driver, results are returned in less than a second.

All three queries return the same results.

Why would this be?