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
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.
#2
Language / Re: RGB Listbox Colors
November 15, 2024, 05:38:33 PM
Hang on what version of PVX are you using? :)
#3
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.



#4
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.
#5
Nomads / Re: Left-Justify BUTTON Text
November 07, 2024, 10:27:21 AM
Do you have these options?
#6
ODBC / Re: ODBC PxPlus SQL ODBC Driver UNION
November 06, 2024, 08:04:13 PM
What error is being returned?  MSG(-1) ?
#7
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.
#8
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.
#9
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.
#10
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
#11
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.
#12
If using ED+  and have 2 programs loaded with tabs, is it normal that it always goes back to top of the program when switching tabs? 

*IT worked fine through windx,

PS.  I just tested a local windows PVXPLUS and it holds the position as expected... Is this an ED+ bug through windx?  Latest pvxplus 21 on Linux!

Thanks?

#13
Ok thanks!
#14
With the newest pvxplus 21.00 I'm noticing certain panels when processed from within other panels do not retain the default background (library defaults) and return to white.  I can send you a test scenario, just want to know if this isn't already known.
#15
Thanks, I did not get it, I got another one today from another ticket.  #512072, so that email is working so perhaps I entered wrong email on the first ticket?