Menu

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.

Show posts Menu

Messages - martinp

#1
Hey I use the pvx web server you need to do the following:

cat privkey.pem fullchain.pem > pxplus_key.pem

and point your webserver to that SSL pxplus_key.pem everything will work then :)

Then restart the web server.

PS.  If you are running from an ssh you may find error messages displayed on the main console only, so if you are running Virtually see if u can access console.
#2
Programming / Re: MSGBOX Button Names
December 19, 2024, 07:24:03 PM
The problem are the spaces in the MSGBOX, Remove them and it will work.

msgbox "Test","Test","?,BTN1=Summary, BTN2=Detail, BTN3=Cancel,3",x$
To

msgbox "Test","Test","?,BTN1=Summary,BTN2=Detail,BTN3=Cancel,3",x$
#3
ODBC / Re: File Does Not Exist
December 10, 2024, 01:53:10 PM
Any luck? if every other file is working it shouldn't be too hard to figure out where the problem is?  field names? file path location? keys?
#4
I need to add a few more important notes I came across:

The above works great for a simple single connection however if I wanted to have multiple individual channels open at once for various tables then a number of changes have to be done.

#1 I had to install the latest SQL ODBC driver from microsoft Search: ODBC Driver for SQL Server"  At time of this writing it was 18.4.1.1  After you install this you will have a new Driver data source named:

'ODBC Driver 18 for SQL Server'

let OPT$="CONNECT='Driver={ODBC Driver 18 for SQL Server};Server=CONSTRUCT-SQL;Database=InSight;TrustServerCertificate=yes;MARS_Connection=Yes;uid=artcraftinsight;pwd=insight'"
#2 A few key Added options were needed at least for my case.

MARS_Connection=Yes

is the important one which allows multiple requests at one time.

TrustServerCertificate=yes (This was for my setup)

If you are not passing a user name for a trusted connection add: ";Trusted_Connection=yes"

After I did above I could create as many concurrent opens to the SQL Database as I needed.

Hope this helps.
#5
Here is a very basic example of an SQL connection with a dsn-less connection to a Microsoft SQL Server.  (pvxplus 21)

This is through windx and for reference on linux but should work elsewhere.

I had great difficulty with the documentation finding this so I hope it can be updated for this simple case, I hope this helps someone I found numerous mailing list tips ideas on this and I wanted to just summarize it all to a very simple real world example.

SQL_Server = CONSTRUCT-SQL
SQL_Database = Artcraft_Machines
uid = SQL user id
pwd = SQL password

SQL_Table = scm_artcraft

Now because I specify "uid" and "pwd" in the connect string with the OPT=  We do not have to pass the different syntax of USER=abc, PSWD=def on the Open.  If you do not specify in connect string then you must use this USER/PSWD syntax on open.

Also it's critical to pass "ignore;"  as the first parameter on the open as it just skips this because we are using a connect string but you still need it on the open as a padding.


0010 begin
0020 !
0030 let OPT$="CONNECT='Driver={SQL Server};Server=CONSTRUCT-SQL;Database=Artcraft_Machines;uid=artmachine;pwd=artmachine'"
0040 open (1,iol=*,opt=OPT$)"[lcl][odb]ignore;scm_artcraft;Key=Code" ! ;USER=artmachine;PSWD=artmachine"
0050 !
0060 select * from 1
0070 print CODE$,"   ",THICKNESS,"x ",WIDTH," x ",LENGTH
0080 next record
0090 !
0100 print lst(iol(1))



There was also notes of using {SQL Server Native CLient 11.0} instead of {SQL Server} or whatever vers I think this is needed, I assume based on windows versions.  This may differ based on your SQL version.  But for me I was just trying a regular Microsoft SQL Server.
#6
Language / Re: RGB Listbox Colors
November 15, 2024, 05:38:33 PM
Hang on what version of PVX are you using? :)
#7
Programming / Re: Optimizing printing speed through Windx
November 12, 2024, 04:34:23 PM
That's a good solution too, I resorted to just printing to PDF and popping up the PDF and letting the user print.  From over a minute to seconds they didn't mind.

You can also try to group your documents into one PDF then one print instead of multiples.

I previously invoked acrobat and command line parameters:

invoke wait "[wdx]"+quo+EXE$+quo+" /h /n /t "+quo+F$+quo

F$ in this case was file

/n - Launch a new instance of Reader even if one is already open
/s - Don't show the splash screen
/o - Don't show the open file dialog
/h - Open as a minimized window
/p <filename> - Open and go straight to the print dialog
/t <filename> <printername> <drivername> <portname> - Print the file the specified printer.


exe depends on acrobat version etc... fun..

I assume you tried all the 'TU' and '+W'=1 and anything else... spawned session?  what vers of pvx.



#8
ODBC / Re: ODBC PxPlus SQL ODBC Driver UNION
November 08, 2024, 01:57:59 PM
"
Another method for getting data from two or more tables is to union select statements together. A union combines the results of two or more select statements. The select statements within the union must have the same number of columns. The columns must also have similar data types. In addition, the columns in each select statement must be in the same order."

To union three or more tables together, you can chain unions together one after another.

I saw this in the docs not sure if it helps.
#9
Nomads / Re: Left-Justify BUTTON Text
November 07, 2024, 10:27:21 AM
Do you have these options?
#10
ODBC / Re: ODBC PxPlus SQL ODBC Driver UNION
November 06, 2024, 08:04:13 PM
What error is being returned?  MSG(-1) ?
#11
Nomads / Re: Left-Justify BUTTON Text
November 06, 2024, 07:46:37 PM
So on the nomads panel itself you can set the button to have text left justfied in the font section of button.
#12
Nomads / Re: Left-Justify BUTTON Text
November 06, 2024, 07:00:30 PM
I don't think you can with the dynamic properties ' 

you could add btn.ctl'text$=PAD("Ok",10)  some spaces ...

What are you trying to do exactly.
#13
Nomads / Re: SHOW CONTROL
October 19, 2024, 10:36:42 PM
Hey Mike, Looks like for fonted text you need to assign the text to a group (Utilities->Group Assignment) then use the following:

call "*wingrp;HIDE",YourGroupName.grp$ 
call "*wingrp;SHOW",YourGroupName.grp$

To do what you need if you are still interested in using a fonted text.
#14
Nomads / Re: SHOW CONTROL
October 19, 2024, 02:43:41 PM
Hey Mike, check your nomads panel header if you have SUPPRESS .VAL checked otherwise each variable has this attached to it
#15
Programming / Re: Vertical Scroll Bar in WindX Window
October 15, 2024, 11:55:53 PM
Hey, Are you trying to fit more items on the panel? Maybe try using the Header resizable / scrollable setting.  This will add a scrollbar to the panel.

Use Page down in nomads to make the panel larger.

I've never really found a use for this though but perhaps you may.