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 - Devon Austen

Pages: 1 ... 16 17 [18] 19
256
Programming / Re: FTPS instead of FTP or SFTP
« on: September 12, 2018, 03:17:52 PM »
I haven't tried this and don't know if it will work but have you tried specifying ftps:// and the port when using *web/ftp.

CALL "*web/ftp;receive", "ftps://vendorServer:990", user$, password$, 0, "someFile.ext", download_dir$, case$, result$

FTPS is just FTP+SSL and behind the scenes we use curl which supports FTPS so it may be as a simple as that. If that doesn't work likely we would need to update the utility to try to support it. In which case I recommend creating a wish list forum post so we can gauge interest.


257
ODBC / Re: Extract on ODBC Sql Server
« on: August 22, 2018, 03:10:02 PM »
Likely you need "CONCURRENCY=LOCK" and "EXTROPT=(UPDLOCK)" in the open options or in the [ODBC] INI section. You can put it in the INI if all of your ODB opens will be to a MS SQL db if not use the open options on the [odb] open to the MS SQL db.

258
Wish List / Re: modernize the documentation
« on: August 17, 2018, 09:01:20 AM »
Hi Thomas,

The examples in the POS() function documentation all look correct. An example in the documentation does not necessarily mean a code/program example. In the case of the POS() function and probably a lot of the other functions the example is just of use of the function. It shows you a specific call to the function and the example tells you what the result is. Obviously if you want to use the function in a code/program you need to do something with the output or you will get a error 20.

Making every example in the documentation actual code/program examples would possibly make the examples less concise.

By necessity the documentation must assume a basic understanding of PxPlus syntax. The basics are documented but all that info can't be on every page of the documentation. Beginners need to learn some of the basics like, that it is a syntax error to call a function and do nothing with the return value, and how line numbers work. If they do that they they should have no problem with the documentation.

259
Programming / Re: *ufar for multi-segmented files
« on: August 07, 2018, 11:25:02 AM »
You could also do a KEYED LOAD instead which is often much faster especially if you can lock the file when doing it.

https://manual.pvxplus.com/?directives/keyed_load.htm

260
Programming / Re: *ufar for multi-segmented files
« on: August 07, 2018, 11:22:00 AM »
*ufar should not be used with multi-segmented files or for file larger than 2GB. You should use *fixvlr instead.

*fixvlr is available in PxPlus 2016 or higher.


261
Registration and Setup / MOVED: Dictionary
« on: August 07, 2018, 08:53:41 AM »
Looks like this question accidentally got posted to Registration and Setup board. The question is about the Nomads Data Dictionary so I have moved this topic to Nomads.

https://forum1.pvxplus.com/index.php?topic=121.0

262
Wish List / Re: Select a single field not Just *
« on: August 02, 2018, 09:41:45 AM »
The PxPlus solution would be to:

Code: [Select]
OPEN (1,iol=*,opt="REC=PRODUCT,COMPANY,PRODCTDES,SKU")"[odb]mydsn;mytable"
SELECT * FROM 1 WHERE Product$='"+Prodct$+"' and company$='"+%C$+"""
...
NEXT RECORD

This would send the SQL "SELECT PRODUCT,COMPANY,PRODCTDES,SKU FROM mytable WHERE Product='myproduct' and company='mycompany'"

It returns a little more then just PRODCTDES,SKU but Pxplus needs to know those fields used in the WHERE clause are fields.

If the WHERE is the same for the entire open you can use a FORCE= on the open and then you wont have to include the PRODUCT and COMPANY in the REC= clause and it will only return the PRODUCTDES and SKU fields.

If this won't work for you then using your own SQL is the best option.

263
Programming / Re: PxPlus 2018 closing when trying to use key number 17
« on: August 02, 2018, 09:23:12 AM »
Thanks for the info.

We can reproduce the issue and are working on a fix that will be included in an online update.

264
Wish List / Re: Select a single field not Just *
« on: August 01, 2018, 02:55:09 PM »
Yes you can specify a single field or multiple fields instead of just * for all fields.

The thing you have to keep in mind is the SELECT directive accepts an iolist which is a sequential list of field names. You can call the fields to return the data in whatever you want what matters is not the name but the order. You can use an * in the iolist to skip fields.

So if you had a table with the following fields ID$, Name$, Address$, YTDSales

You can do SELECTs like these

SELECT curID$ FROM "mytable" WHERE curID$="000042"
SELECT CurID$,*,*,YTDSales FROM "mytable" WHERE YTDSales > 100000

If you want to use a field in a WHERE you will need to include that field in the iolist.

There won't be a performance difference between SELECT * FROM "mytable" and SELECT id$ FROM "myTable"  in both cases the whole record is returned. The only difference is one the record is parsed into the files/tables iolist in the other it is parsed into the supplied iolist which may just be some of the fields.

If speed is your goal I would suggest making sure you are using PxPlus 2018 which has many SELECT optimizations that will make sure we will only read back the records we need instead of all of the records. If you are connecting to an external DB then you can also look at using WRITE RECORD (chan) "SQL Code". This why you can design the optimal SQL query for your purpose and use that. You get the results of your SQL query via a READ RECORD (chan) sql_results$ .

265
Programming / Re: PxPlus 2018 closing when trying to use key number 17
« on: August 01, 2018, 10:06:08 AM »
I don't think he is using PxPlus data files so the limit of 16 keys may not apply even if it did it should return an error and not crash. He also mentioned it worked in PxPlus 2017.

As a temp workaround turning on the system parameter '!O' may avoid the issue by turning off the recent optimizations on external DB selects.

266
Programming / Re: PxPlus 2018 closing when trying to use key number 17
« on: August 01, 2018, 09:12:15 AM »
If PxPlus 2018 is closing without warning that means it or a library it has called has crashed. Since you are using a SELECT on a external database when it happens I suspect there is an issue with the optimized SELECT logic in PxPlus 2018.

I suggest you create a support ticket for this issue.

I also suggest that you include in the support ticket:
  • Info about what external database you are connecting to.
  • What PxPlus interface are you using to connect to it i.e. [ODB], [ADO], etc.
  • A description of the table and keys you are doing the select on, maybe even a CREATE TABLE directive for the table if possible.
  • The SELECT code it crashes on.
 

267
Programming / Re: Utility to extract text from .rtf files?
« on: July 25, 2018, 10:55:14 AM »
The CVS RTF conversion was done for converting simple RTF from PxPlus RTF Multilines into text. It is not guaranteed to work with any RTF generated elsewhere.

From my testing I was able to get text with some extra newlines from a conversion of a RTF file created by MS Wordpad but I was not able to get any text from conversion of RTF generated by MS Word 2010.

I think the easiest solution is to let Microsoft's own tools handle the conversion and to let MS Word do the work.

268
ODBC / Re: Convert data dictionary data files to SQL tables
« on: July 25, 2018, 09:12:21 AM »
I am not to sure what you mean when you say "convert data files in the data dictionary to sql".

The PxPlus SQL ODBC driver and PxPlus SQL Server products are used to access PxPlus data file from third party applications like MS Excel using SQL statements i.e. "SELECT * FROM invoices".

The PxPlus SQL ODBC driver is used when the PxPlus data and the third party application are on the same machine. The PxPlus SQL ODBC driver and the PxPlus SQL Server are both used when the PxPlus data and the third party application are on different machines.

If this is what you are trying to do then you need to look at the documentation for instructions on how to configure and use:

https://manual.pvxplus.com/?odbc/configuration_procedures.htm
https://manual.pvxplus.com/?odbc/using_odbc_driver.htm

If what you want to do is convert your PxPlus data into relational database tables like for example MS SQL Server tables then you would not use those products at all. What you would do is use the [ODB] or [ADO] special file interface to connect to the relational database and you could create the table and copy in the data from your PxPlus data via a PxPlus program.

https://manual.pvxplus.com/?command_tags/odb.htm
https://manual.pvxplus.com/?command_tags/ADO.htm

To create the table you would do a WRITE RECORD (odb_chan) "CREATE TABLE ...". To make this easier you can from the data dictionary maintenance panel go to the utilities menu and select generate external and then select SQL Create Table. This will give you a SQL CREATE TABLE command for the current table selected in the data dictionary maintenance panel.

To copy the data in you could just do a loop that reads a record from the PxPlus data file and then does a WRITE RECORD (odb_chan) "INSERT INTO ..."

269
Programming / Re: Utility to extract text from .rtf files?
« on: July 24, 2018, 01:49:01 PM »
Hi Ned,

Here is a link to the current RTF specification (https://www.microsoft.com/en-ca/download/details.aspx?id=10725) at least according to Wikipedia (https://en.wikipedia.org/wiki/Rich_Text_Format).

Another approach you could use is to use the COM interface and open the RTF file via MS Word and then read back the text. If you are using PxPlus 2017 or higher this is made even easier because you can use the new *obj/word object (https://manual.pvxplus.com/?PxPlus%20User%20Guide/External%20Components/PxPlus%20COM%20Support/Word%20Object.htm).

270
Registration and Setup / Re: Version Discrepancy
« on: July 19, 2018, 02:05:27 PM »
It is unlikely that the activation being for version 11 has anything to do with the PxPlus crash you are seeing. I would look at other differences between the working old server and the problem new server. It is possible that other differences between the two systems is at fault here. For example, firewall, permissions, or OS libraries.


Pages: 1 ... 16 17 [18] 19