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 - michaelgreer

Pages: [1] 2 3 ... 5
Language / Automation issue (OLE)
« on: August 02, 2021, 10:43:37 AM »
I am trying to duplicate this VBS script in PxPlus:

strSLXCon = "Provider=SLXOLEDB.1;Password=password;Persist Security Info=True;User ID=admin;Initial Catalog=FACTSCONNECTION;Data Source=IP-SQL;Extended Properties=PORT=1706;LOG=ON;CASEINSENSITIVEFIND=ON;AUTOINCBATCHSIZE=1;SVRCERT=;"
Set objSLXCon = CreateObject("ADODB.Connection")
objSLXCon.Open strSLXCon
Set objSLXRS = CreateObject("ADODB.Recordset")

strSQL = "slx_dbids('Account',1)"
objSLXRS.Open strSQL, objSLXCon

        strID = objSLXRS.Fields(0)

msgbox strID

Here is my code:

1000 !
1005 def object crm,"ADODB.Connection"
1007 def object rec,"ADODB.Recordset"
1010 constr$="Provider=SLXOLEDB.1;persist security info=True;Initial Catalog=FACTSCONNECTION;PASSWORD=password;user ID=admin;Data Source=IP-SQL;EXTENDED PROPERTIES=""PORT=1706;log=on;casesensitivefind=on;autoincbatchsize=1;SVRCERT="""
1015 crm'open(constr$)
1020 idsql$="slx_dbids('Account',1)"
1025 ! id$=crm'execute$(idsql$)
1030 ! print id$
1035 rec'open(idsql$,*crm)
1040 rec'movefirst()
1045 id$=rec'fields$(0)
1050 print id$
1080 drop object crm
1085 drop object rec

I do not get the same result as the VB script which does return the correct value. My code executes, but generates a completely different set of ID's.  Any pointers on what is wrong here?

Programming / Re: Code failure between PVX 9.1 and 15.1
« on: July 20, 2021, 11:26:22 AM »
Devon,  at the 9.1 version I get no pop up when I do the open with '!Q' set.  on the 15.1 version, on the open -same exact line of code - I get "SELECT COUNT(*) FROM".  Again, this is on an open. The code for the open is at the top of this thread.  Same DSN accessed by the 9.1 and the 15.1 version.

Programming / Re: Code failure between PVX 9.1 and 15.1
« on: July 20, 2021, 10:57:44 AM »
Devon, it is just on the open, but  I will do as you indicate.

Programming / Re: Code failure between PVX 9.1 and 15.1
« on: July 20, 2021, 08:53:49 AM »
Any word on this.  The only thing that has changed here is the PVX version.  This is a productions system and is limping along without an important feature.

Programming / Re: Code failure between PVX 9.1 and 15.1
« on: July 15, 2021, 04:45:31 PM »
That was stupid on my part. Sorry.  Now we are getting somewhere:

42000: [Microsoft][ODBC Microsoft Access Driver ] Syntax error in FROM Clause


Programming / Re: Code failure between PVX 9.1 and 15.1
« on: July 15, 2021, 04:24:49 PM »
@Mike - I had checked, but just rechecked. My Windx is 32 bit and the ODBC driver is 32 bit.  @Devon, msg(-1) is empty.  Any other ideas?

Language / Launch PxPlus with -S
« on: July 15, 2021, 03:40:30 PM »
Ignore this. I coldn' delete. Missing inittab file.

I have to have 2 instances of the inittab emulator running on a server.  I hacked the winutl/service program to change the name of the service from PxPlusInit to PxPlusInitA and also changed the long name.  I see in the registry that the image is \pathtopvx\pxplus.exe -s PxPlusInit93. (normally for the first install that is just PxPlusInit).  This service will not start and stay running. I can find now documentation on the -s switch, but I suspect the name PxPlusInit93 is what is doing me in.  Any insight appreciated.

Programming / Code failure between PVX 9.1 and 15.1
« on: July 15, 2021, 11:59:26 AM »
This line of code executes on version 9.1 of PxPlus with no issue.

10010 ok=1; test=hfn; if %wdx=1 then open (test,err=MISSING_WASP)"[WDX][ODB]SunnyLabel" else open (test,err=MISSING_WASP)"[ODB]SunnyLabel"

The exact same code on the same workstation returns an error 15 and branches to the "MISSING_WASP" label on vesion 15.0.  %WDX is in fact 1, so the wdx vefrsion is executing.

What might I be missing here?


Language / Writing Postgres tables
« on: July 09, 2021, 01:12:55 PM »
Has anyone every written to a postgres database out of a PVX program. Any pointers would be appreciated.

Language / Re: *windev* and scheduled tasks
« on: June 17, 2021, 02:57:24 PM »

Even though the scheduled task was set to run as administrator, it was not set up by user administrator. When we deleted it and re-added under the administrator login all was good, so you were pointing in the right direction.


Language / Re: *windev* and scheduled tasks
« on: June 17, 2021, 10:57:10 AM »
Thanks Stephan!  I am running as administrator with highest permissions.  The spooler *is* however configured for a shared pritner.

Language / *windev* and scheduled tasks
« on: June 17, 2021, 09:46:19 AM »
We have a user trying to run a program via the Task Scheduler on windows and a printer open to a *windev* device is throwing an error 12.  Is there a limitation on using *windev* when running something in this fashion?

Programming / Re: Device communication via a USB port
« on: May 30, 2021, 10:04:32 AM »
Yes indeed. This dinosaur uses usb to serial port adapters all the time. The configure as com ports and all works well.  Cheap as $9 US.

Language / Opening MySQL on a remote server using ADO command tag
« on: May 04, 2021, 10:27:38 AM »
I have a situation where I need to access a SQL database on a different server than the one where I am running PxPlus (same network).  Can someone give me a working example of an open command  to do this. It is not clear to me from the documentation where I specifiy the ip address for the server.

Programming / Re: Embed an IO_PROGRAM
« on: April 20, 2021, 08:33:37 AM »

Thanks!  That is what I was looking for. I have inadvertently embedded a bad program before, so know the nightmare that can cause!


Pages: [1] 2 3 ... 5