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 - Thomas Bock

#1
Wish List / dump disable
October 18, 2024, 03:23:04 AM
We want to disable variables by globbing patterns and by using a generic approach.

suggestions:
dumb disable "%param_*"
dumb disable via varName$

In our application we create a lot of global parameter variables, which don't need to be part of a dump.
Globbing patterns and generics would allow us to exclude these and all nomads variables.
#2
Programming / Re: no txt-attachments with *web/email
August 22, 2024, 01:45:58 AM
Solved!
As usual there have been SEPs inside my bodytext. Replacing them with $0A$ solved the prblem.
#3
Programming / Re: no txt-attachments with *web/email
August 16, 2024, 03:25:12 AM
I tried ?P, ?Q, ?B and no forced encoding. The txt attachment was never received.
I checked that with the GMX app, GMX webpage and our Outlook client.
Outlook creates the ATT00001.htm attachment and GMX appends that content to the bodytext. Both destroy our company information at the end of the mail.
#4
Programming / no txt-attachments with *web/email
August 13, 2024, 05:11:41 AM
I can't manage to sent a txt-file as an attachment with *web/email (PxPlus 20.10).
The mail doesn't contain the originally attached file. Instead of this there is an attachment called ATT00001.htm containing the body text. I tried to force BASE64 encoding with the ?B suffix, but that didn't change anything. Other file types like png, xlsx, csv and pdf work fine.
*web/webserv.mim contains text/plain. That seems to be correct.
What am I doing wrong?
#5
Programming / Re: talking to smtp.office365.com
August 13, 2024, 04:48:11 AM
*web/email works for me. Thank you Mike.
But I have an issue with text attachments. I will start a new thread for that.
#6
Programming / Re: talking to smtp.office365.com
August 12, 2024, 05:43:02 AM
That change has no effect. After sending the secure option I cannot read the answers from the server any more. It accepts everything I send, but does nothing.
Is there a sample code showing a successful change to a secure connection and what needs to be send next in case of smtp?
#7
Programming / Re: talking to smtp.office365.com
August 09, 2024, 09:33:57 AM
That sounds so easy, but I can't get it working  :(
I post my sample program below. After 'option'("Secure","") nothing useful is happening any more. I tried many different things and combinations but the program can never send the second EHLO. All I received where many errors 2 or 3 or 11.

begin
delay = 3
eol$ = $0D0A$
channel = hfn
open (channel, err = FINISH) "[tcp]smtp.office365.com;587;TLS1.3;CERTIFICATES=IGNORE"
gosub GET_RESPONSE
write record (channel) "EHLO " + nid + eol$
gosub GET_RESPONSE
write record (channel) "STARTTLS" + eol$
gosub GET_RESPONSE
write record (channel) 'option'("Secure", $$) + eol$
gosub GET_RESPONSE
!write record (channel) 'option'("TLS", $$) + eol$
!gosub GET_RESPONSE
write record (channel) "EHLO " + nid + eol$
gosub GET_RESPONSE
FINISH:
write record  (channel,err=*next) "quit" + eol$
close (channel)
end
GET_RESPONSE:
read record (channel, tim = delay, err = FINISH) response$
print str(++i:"#0: "),response$
wait 0
return
#8
Programming / talking to smtp.office365.com
July 26, 2024, 09:57:51 AM
We use an own implementation of SMTP if the user runs a mail server on his own.
This doesn't work with the MS server, as it requires TLS.
What is best practice for using that server from a Linux host?
#9
ODBC / count distinct not working
May 22, 2024, 06:57:37 AM
I receive an error 15 with

select count(distinct columnName) from table

msg(-1)=37000: [PxPlus][SQL ODBC Driver]Expected lexical element not found: <identifier>

How can I count distinct column values using ODBC 7.0.3?
#10
Programming / Re: strange error 61
April 16, 2024, 10:24:31 AM
This is a WindX session and the security options are properly set.
The error occures at random. But how can that be? The file has just been created, so PxPlus must be able to open it.
#11
Programming / strange error 61
April 16, 2024, 04:35:17 AM
I don't understand why the code below throws an err 61 sometimes


BUSY_FILE_NAME$ = "[lcl]Busy.txt"
serial BUSY_FILE_NAME$, err = *next
if tcb(2) {
rem in case the file could not be created ...
} else {
busyFile = hfn
open lock (busyFile) BUSY_FILE_NAME$
rem this throws error 61 ???
}
#12
Programming / Re: accessing mySQL-DB
March 25, 2024, 04:57:34 AM
Are there any new insights?
#13
Programming / Re: accessing mySQL-DB
March 18, 2024, 04:25:53 AM
The customer uses openSUSE Leap 15.5
We use a Gentoo and can reproduce the issue
#14
Programming / Re: accessing mySQL-DB
March 14, 2024, 02:52:19 AM
That's what I'm saying.
But the issue comes with version 3.2.7.
#15
Programming / accessing mySQL-DB
March 13, 2024, 11:19:19 AM
We encounter problems with a newer version of libmariadb.so.3
PxPlus 20.10 is installed on a Linux server.
The program below runs with version 3.1.13 on a Linux server. With version 3.2.7 the result is empty and msg(-1) returns "MYSQL:0:".

begin
dbOpt$ = "SERVER=my_server;USER=my_account;PASSWORD=my_password;DATETIME_CONVERT=N"
dbName$ = "[MYSQL]my_database;;"
channel = hfn
open (channel, OPT = dbOpt$, tim = 10) dbName$
query$ = "SELECT * FROM `myTable` limit 1"
write record (channel)query$
gosub buildPVXIOList
repeat
read record(channel,err=*next)sqlResultItem$
if tcb(2) {
print msg(err)
print msg(-1)
break
}
print ++c,": ",sqlResultItem$
until 0
close( channel)
end
buildPVXIOList:
local sqlIOL$    = ken(channel, ind = 3)
local pvxIOL$    = "IOLIST "
local separator$ = $$
local items      = pos(";" = sqlIOL$, 1, 0)
local counter    = 0
local virtual    = 0
repeat
fieldDefinition$ = arg(sqlIOL$, counter + 1, ";")
read data from fieldDefinition$, sep = "," to fieldName$, fieldType$
fieldName$  = tbl(nul(fieldName$), fieldName$, "_VIRTUAL" + str(++virtual))
pvxIOL$    += separator$ + fieldName$
if (mid(fieldType$, 1, 3) = "CHR") or (fieldType$ = "DATE") {
pvxIOL$ += "$"
}
separator$ = ","
until (++counter > items)
pvxIOL$ = sub(pvxIOL$, "-", "_")
dim sqlResultItem$ : cpl(pvxIOL$)
return


What needs to be done in order to work with then newer version?