PxPlus User Forum

Twitter Twitter Twitter

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Mike King

Pages: 1 ... 48 49 [50] 51 52 ... 65
736
Wish List / Re: Database Conversion Utility
« on: June 28, 2019, 06:31:44 PM »
Thomas,

A couple of thoughts about making the connection more dynamic;

If you are using ODBC then you simply need to specify a DSN which can then be changed on the server/workstation.  This would be the preferred method when running on Windows

For non-ODBC connections most of the value provided in the OPT= string can be set in the INI file so things such as Host name, port, userid and password can be placed in the INI file as opposed to the PREFIX file.  This allows you to leave most setting out of the Prefix file so simple changes can be made to the INI file.

737
Wish List / Re: Database Conversion Utility
« on: June 26, 2019, 10:55:59 AM »
Thomas

Note that a numeric defined in the PxPlus data dictionary with a length of "10" will be assumed to have no decimals.  You should have defined it in the PxPlus data dictionary as 10.2 or similar.

If you don't specify any decimals in the PxPlus data dictionary then our ODBC interface will also report no decimal which could cause trouble for other programs.

738
Programming / Re: Object Oriented Question
« on: June 24, 2019, 02:48:28 PM »
Jeffrey,

If you are using PxPlus 2019 just use the *obj/chart object.  It will draw a chart on the screen, a Windows printer, PDF file, and can even generate HTML for the chart.

You can find the documentation at: https://manual.pvxplus.com/page/utilities/chart_object.htm which includes a few sample uses of the object.


739
Language / Re: MySQL
« on: June 22, 2019, 05:58:51 PM »
Applications for Windows can come in 32 bit or 64 bit varieties.  Some come in 32 bit only, some in 64 bit only and some both.  While most Windows systems now run the 64 BIT OS, a large number of Windows programs are 32 bit.  Generally if there is no need for more than 2GB of memory in an application 32 bit is all that is needed and will generally take up less memory to run.

PxPlus currently only ships a 32 but version for Windows but 32 and 64 bit versions for most Linux systems.

As for installing the MySql library, how you obtain the 32 Bit DLL is really up to MySql as I do not think we can legally ship it with PxPlus as its owned by ORACLE.

740
Thin Client/WindX / Re: Windx Security on Terminal Server
« on: June 18, 2019, 09:34:59 AM »
Michael

If you set the WDXTRUST environment variable to a list of sites, it effectively does a disable on the sites specified.

You can also update the WindX.ini file yourself if desired, although we strongly recommend against fully disabling the security.  If you do and the workstation happens across a web site with a "windx://someserver" URL, the system could auto-launch a WindX connection and gain access to all files on the workstation.

741
Wish List / Re: Case insensitive DIM(FIND str$...)
« on: June 14, 2019, 04:29:24 PM »
So just write the data with a sequence number as in:

OPEN (1) "*memory*;keydef=[1:1:4:B],[2:1:10:C]"
WRITE (1) 1, "Dog"
WRITE (1) 2, "Cat"
WRITE (1) 3, "Pig"
WRITE (1) 4, "Ant"
WRITE (1) 5, "Pig"
WRITE (1) 6, "Zebra"

Now you can access by number (primary key) or by name (kno=1) plus you could add additional columns to the record if required.  You can access this as follows:

->print rcd(1,key=4)
4
Ant

->print rcd(1,key="pig",kno=1)
3
Pig

->

742
Wish List / Re: Case insensitive DIM(FIND str$...)
« on: June 14, 2019, 03:57:50 PM »
Why not just use a memory file, it would allow you specify a case insensitive key.

743
Wish List / Re: Case insensitive DIM(FIND str$...)
« on: June 14, 2019, 03:13:03 PM »
The issue would not be so much on the FIND but a potential issue if you had keys of "Mike", "MIKE" and "mike" -- which would the FIND return?

What you could do is spin through the array using the DIM(KEY array[index] ) to get the keys or use the FOR directive to walk through the elements as in:

Code: [Select]
0010 LET x$["John"]="Smith"
0020 LET x$["john"]="Jones"
0030 FOR n$ INDEX x${ALL}
0040 PRINT n$
0050 NEXT



744
Programming / Re: closing browser
« on: June 13, 2019, 09:38:48 AM »
As I mentioned, the onbeforeunload can be used to display a warning message -- and as per WWW standards that is all it can be used for.  In actual fact the original definition of this event was to allow you to display a message of your choosing to the end user, however current Chrome and FireFox (I believe) don't actually use the message you pass back, instead they display generic messages in the language of the user so you don't have to worry about providing messages in all possible languages.

The "onunload" is the only option you have and that can only send an asynchronous Ajax request that may or may not get received depending on timings.

Your safest bet is to have your web pages send periodic messages to the host to indicate they are still active and a background process on the server check for instances where these message are no longer being received to do whatever cleanup is required.

745
Programming / Re: Can the Providex Plus manual be downloaded?
« on: June 12, 2019, 11:23:52 PM »
While not a PDF the Windows download includes the full manual in CHM format.

746
Programming / Re: image/png;base64 string to actual png
« on: June 07, 2019, 03:22:07 PM »
David,

Make sure the 'HP' parameter is set to 1 in order to use the more advanced HARU PDF libraries.

PxPlus 2019 does support PNG output to PDF files so the simple solution would be to upgrade.  Assuming you are on the maintenance plan (CCP not LAP) you should be able to do this upgrade at no charge.


747
Programming / Re: closing browser
« on: June 06, 2019, 11:04:10 AM »
Generally there is no guaranteed way to trap the closure of a web browser and certainly no way for PxPlus to handle or even be notified about it without you putting some code (JavaScript) in your web page to handle the issue.

Most browsers support an 'onbeforeunload' event where you can display a warning message if that is what you want.
You can also try trapping the 'onunload' event and have it send a Ajax style message to the server -- however at this point you cannot prevent the closure from happening.

Regardless of what you do you need to consider that the browser being closed may be due to circumstances beyond the control of the user or browser.  Power failure, reboot, forced close, loss of connection, etc.. are all reasons that your browser connection may be terminated.

What I would suggest is you create some form of background polling between the browser and PxPlus where you can consider no polls for a period of time as a disconnect.  This s what iNomads does in order to help assure the browser is still connected as well as setting an 'onbeforeunload' event handler.

As a side note, if you are looking to trap the browser closure so that you can 'save' information the user has entered you might consider using 'localStorage'.  You could create some JavaScript to preserve user input, form information and state in Local storage. You could re-use this later when the browser was restarted and the user re-connected to the site.  Perhaps by attaching to the onsubmit event you could save the data being submitted and target URL, then on reconnect re-submit the data.  Good web logic should already be capable of handling re-submissions so you likely would have little to change on the host and merely have to create some JavaScript to attach to the <form>.


748
Programming / Re: image/png;base64 string to actual png
« on: June 04, 2019, 02:52:45 PM »
Take the data following the comma after 'base64' and pass it through the CVS function.  This will get you file contents which you can write to a png file.

Something like this should work for you: 
(Assumes the "image/png;base64,iv..." is in the variable input$)

Code: [Select]
pngData$=CVS( input$(pos(","=input$)+1), "Base64:ASCII")

open purge (hfn,isz=-1) "somename.png"
write record (lfo) pngData$
close (lfo)

749
Programming / Re: Diagnosing error 17 on dim load of json data
« on: May 29, 2019, 04:31:08 PM »
Just an FYI -- I just added this to be addressed with the next release.

750
Programming / Re: Diagnosing error 17 on dim load of json data
« on: May 29, 2019, 03:32:18 PM »
You have floating point values (n.nnnnne+-n) which our JSON converter does not like as it assume numeric data is composed of 0-9, ., plus sign.


Pages: 1 ... 48 49 [50] 51 52 ... 65