Date   

Re: DataViewToHTML with direct SQL

Steven Blank
 

Adam,

This may be one of those secret handshake things for which Magic's documentation is infamous, but I don't think you can use the DataViewTo••• functions in a Batch task, at least not in a Direct SQL Batch task, at least not that I've ever been able to make it work. For what it's worth, using the Pervasive SQL gateway and evaluating a DataViewTo••• function anywhere in a Direct SQL Batch task's Record level elicits the ODBC error, "Invalid cursor state" – there's a hint buried in there.

The only way I found to use DataViewTo••• functions with Direct SQL is in an Online task. This just means that you have to rig the Online task to work like a batch task, that is, in-an-out, one-and-done.

Steven G. Blank
SGBlank Consulting


Re: www.pushok.com down?

Marvin VIDAL
 

I have just checked it and it is working at least on my PC.

imagen.png


Marvin VIDAL


On Mon, May 24, 2021 at 10:01 AM Charles George <Charles73@...> wrote:

Help! 😊, anyone know of a way to get around the PushOk re-registration in Xpa 3.2?  It looks like their www.pushok.com servers are down…

 


 


Thanks!


www.pushok.com down?

Charles George
 

Help! 😊, anyone know of a way to get around the PushOk re-registration in Xpa 3.2?  It looks like their www.pushok.com servers are down…

 


 


Thanks!


Re: Incremental search optimization #mssql

Adrian Wick
 

Thank you Steven Burrows!

To be honest i would love to completely remove the incremental search ... But sadly we cannot live without it. Its a "must" feature.

I turned on logging to see exactly what is sent to the database. Like i mentioned in my first post, changing index to clustered and adding
a new index which includes the field i search on + clustered field makes a BIG BIG difference. If i have the same setup, except for clustered
index, i see a very small improvement. if any at all.

So i think ill just alter the index and add a new one. or two ... I have to look on how many fields we do incremental searches.

I also dug a little deeper and found a settings in ini:
CacheSizeArrayFetch = 100

which means 100kb 

Isn't 100kb low for todays network traffic? Did anyone change this setting? I don't see any improvement when changing this to a higher number ...

Regard,
A


Re: DataViewToHTML with direct SQL

Jackson, Adam
 

HI,

 

Just tried that by doing the RepStr I did on Column List virtual and still same.

 

Adam

 

Adam
Jackson
Manager, Business Systems
T  +447949892482
M  +447949892482
E  adam.jackson@...
McLaren Formula 1 Team
 

From: main@magicu-l.groups.io <main@magicu-l.groups.io> On Behalf Of Frederik Soete via groups.io
Sent: 24 May 2021 09:13
To: main@magicu-l.groups.io
Subject: Re: [magicu-l] DataViewToHTML with direct SQL

 

CAUTION: This email originated from outside of McLaren. Do not click links or open attachments unless you recognise the sender and know the content is safe. Report any suspicious emails to security@...

 

Hi, Adam,

 

If I am allowed to guess, I think you do not need the 'Virtual.' part at all.

 

HTH,

 

Frederik Soete

Op ma 24 mei 2021 10:03 schreef Jackson, Adam <adam.jackson@...>:

Hi,

 

I am trying to get DataViewToHTML working on a batch task with direct SQL and it is not working. My set up is as follows:

 

In Task Prefix

Where v Data List is populated with

Trim(v Data List)&IF(v Data List<>'',',','')&VarName('FK'VAR+LoopCounter()-1)

 

And v Column List is populated with

Trim(v Column List)&IF(v Column List<>'',',','')&VarName('FK'VAR+LoopCounter()-1)

Followed by

RepStr(GR,'Virtual.','')

 

v Data List ends up looking like Virtual.<Column1>,Virtual.<Column2>,Virtual.<Column3> etc

v Column List ends up looking like <Column1>,<Column2>,<Column3> etc

 

In Task Suffix

Evaluate Expression DataViewToHTML(0,Trim(v Data List),Trim(v Column List),'k:\html_test.html','',0)

with logical virtual populated in the result of this evaluate expression.

 

When I run the program I do not get the HTML file and the logical virtual is false.

 

When I run the program as a straight batch task with screen on the data is returned to screen ok.

 

Is what I’m trying to do possible and if so what am I doing wrong?

 

xPa 2.5

 

TIA

 

Adam

 

 

 

 

 

 

 

Adam

Jackson

Manager, Business Systems

T  +447949892482

M  +447949892482

E  adam.jackson@...

McLaren Formula 1 Team

McLaren Technology Centre

Chertsey Road, Woking

Surrey, GU21 4YH, UK

mclaren.com

Facebook

Instagram

LinkedIn

Twitter

YouTube

The contents of this e-mail are confidential and for the exclusive use of the intended recipient. If you are not the intended recipient you should not read, copy, retransmit or disclose its contents. If you have received this email in error please delete it from your system immediately and notify us either by email or telephone. The views expressed in this communication may not necessarily be the views held by McLaren Racing Limited.
McLaren Racing Limited, McLaren Technology Centre, Chertsey Road, Woking, Surrey, GU21 4YH, UK. Company Number: 01517478


Re: DataViewToHTML with direct SQL

Frederik Soete
 

Hi, Adam,

If I am allowed to guess, I think you do not need the 'Virtual.' part at all.

HTH,

Frederik Soete

Op ma 24 mei 2021 10:03 schreef Jackson, Adam <adam.jackson@...>:

Hi,

 

I am trying to get DataViewToHTML working on a batch task with direct SQL and it is not working. My set up is as follows:

 

In Task Prefix

Where v Data List is populated with

Trim(v Data List)&IF(v Data List<>'',',','')&VarName('FK'VAR+LoopCounter()-1)

 

And v Column List is populated with

Trim(v Column List)&IF(v Column List<>'',',','')&VarName('FK'VAR+LoopCounter()-1)

Followed by

RepStr(GR,'Virtual.','')

 

v Data List ends up looking like Virtual.<Column1>,Virtual.<Column2>,Virtual.<Column3> etc

v Column List ends up looking like <Column1>,<Column2>,<Column3> etc

 

In Task Suffix

Evaluate Expression DataViewToHTML(0,Trim(v Data List),Trim(v Column List),'k:\html_test.html','',0)

with logical virtual populated in the result of this evaluate expression.

 

When I run the program I do not get the HTML file and the logical virtual is false.

 

When I run the program as a straight batch task with screen on the data is returned to screen ok.

 

Is what I’m trying to do possible and if so what am I doing wrong?

 

xPa 2.5

 

TIA

 

Adam

 

 

 

 

 

 

 

Adam
Jackson
Manager, Business Systems
T  +447949892482
M  +447949892482
E  adam.jackson@...
McLaren Formula 1 Team
McLaren Technology Centre
Chertsey Road, Woking
Surrey, GU21 4YH, UK
mclaren.com
Facebook
Instagram
LinkedIn
Twitter
YouTube

The contents of this e-mail are confidential and for the exclusive use of the intended recipient. If you are not the intended recipient you should not read, copy, retransmit or disclose its contents. If you have received this email in error please delete it from your system immediately and notify us either by email or telephone. The views expressed in this communication may not necessarily be the views held by McLaren Racing Limited.
McLaren Racing Limited, McLaren Technology Centre, Chertsey Road, Woking, Surrey, GU21 4YH, UK. Company Number: 01517478


DataViewToHTML with direct SQL

Jackson, Adam
 

Hi,

 

I am trying to get DataViewToHTML working on a batch task with direct SQL and it is not working. My set up is as follows:

 

In Task Prefix

Where v Data List is populated with

Trim(v Data List)&IF(v Data List<>'',',','')&VarName('FK'VAR+LoopCounter()-1)

 

And v Column List is populated with

Trim(v Column List)&IF(v Column List<>'',',','')&VarName('FK'VAR+LoopCounter()-1)

Followed by

RepStr(GR,'Virtual.','')

 

v Data List ends up looking like Virtual.<Column1>,Virtual.<Column2>,Virtual.<Column3> etc

v Column List ends up looking like <Column1>,<Column2>,<Column3> etc

 

In Task Suffix

Evaluate Expression DataViewToHTML(0,Trim(v Data List),Trim(v Column List),'k:\html_test.html','',0)

with logical virtual populated in the result of this evaluate expression.

 

When I run the program I do not get the HTML file and the logical virtual is false.

 

When I run the program as a straight batch task with screen on the data is returned to screen ok.

 

Is what I’m trying to do possible and if so what am I doing wrong?

 

xPa 2.5

 

TIA

 

Adam

 

 

 

 

 

 

 

Adam
Jackson
Manager, Business Systems
T  +447949892482
M  +447949892482
E  adam.jackson@...
McLaren Formula 1 Team
McLaren Technology Centre
Chertsey Road, Woking
Surrey, GU21 4YH, UK
mclaren.com
Facebook
Instagram
LinkedIn
Twitter
YouTube

The contents of this e-mail are confidential and for the exclusive use of the intended recipient. If you are not the intended recipient you should not read, copy, retransmit or disclose its contents. If you have received this email in error please delete it from your system immediately and notify us either by email or telephone. The views expressed in this communication may not necessarily be the views held by McLaren Racing Limited.
McLaren Racing Limited, McLaren Technology Centre, Chertsey Road, Woking, Surrey, GU21 4YH, UK. Company Number: 01517478


Re: Incremental search optimization #mssql

Steven Burrows
 

Optimisation of this sort of program can be like herding Cats. Get it lightning fast for 1 set of data, and another customer with a different data profile will suddenly have awful performance. Maybe DirectSQL, maybe Link Joins instead of Query, maybe moving links into a subtask called in RP (if possible). There is no right theoretical answer, it depends on the data.

 

Also worth noting that XPA doesn’t tell MSSQL what Indexs to use, it just adds ORDER BY to the statement and lets MSSQL decide. For that reason, I would only bother with the Unique Index being a physical key, the rest can be defined as Virtual Keys in Magic. You may or may not have those keys in MSSQL, it doesn’t matter from an XPA perspective.

 

The quick and dirty answer (or at least the one that doesn’t make your head hurt) is to run Server Profiler/Database Engine Tunning Advisor while using the task on the data in question, then if the suggestions look like they would give decent improvement, apply them in MSSQL. XPA has no need to know about these changes. We don’t do this very often, but sometimes its worth it, it can make a BIG difference even to a perfect formed data structure. Be aware that this can lead to performance loss in areas that update this data, so don’t do it repeatedly, but as a one off it’s a reasonable thing to do.

 

Also worth noting that XPA Help says not to use Incremental Locate in MSSQL – Tough luck, we need to.

 

Steven Burrows

From: main@magicu-l.groups.io <main@magicu-l.groups.io> On Behalf Of Adrian Wick via groups.io
Sent: 23 May 2021 15:50
To: main@magicu-l.groups.io
Subject: [magicu-l] Incremental search optimization #mssql #xpa3.3

Hello all wizzards of Magic,

today i am turning to you about the old sin i have never fixed.

i have a table with 40k-50k records and incremental search is horrible. If i turn off index optimization, everything works, but
the records are not group up. So can someone give me a tip on how to build an index for the table. Here is some more info
about the table itself.

Columns:
1. counter (A10)
2. description (A40)
3. date1
4. date2
5. date3
6. ...

Indexes:
1. counter (unique) (its the only unique key in this table)
2. descritpion (nonunique) (this field is not used in any other index!)
3. date1 + description (nonunique)
4. ...

The problem is incremental search on column "description". So i guess the problem is the 2nd index. Should it also have a counter as a 2nd segment of the index?
Like description + counter? Should 1st index be clustered index? I have made 11 differend tables with differend variations and the best combination is:
1. counter (unique) + clustered
2. description + counter

And this is only for the table itself to start working the way it should. I also have 8 link queries in that window and 2 subforms ... And, if i read correctly, it also matters the number of
records that are shown in the table, because the array on the table is 0, it means that it fetches the number of records * 5 ... So if i have 30 records online, does that mean that it
fetches 150 main recrods and since i have 8 link queries, this means 150 * 8 = 1200? And to put the cherry on the top :) i use descending order in task->range/locate->expressions for
range and locate

Any info is much appreciated!

Regards,
A


C# Devexpress Xtrascheduler Non-static method requires a target

Vili CANKAR
 

Here I am again with Devexpress xtrascheduler...

I Would like to update some properties in xtrascheduler via events and I get
this error: Non-static method requires a target.


I know, that we could not manage event parameters directly, so I did create equivalent event parameter type
object and want to update it with parameters from the documentation and I got
error "Non-static method requires a target"...

Does someone know, what would cause this error ?

Thanks.



--
Lep pozdrav, Vili


Re: Httpcall

Lei Salcedo
 

Thanks for the prompt reply. We were able to resolve this ourselves by using the basic authentication format. But we have to run a script that will default our .Net applications to use TLS 1.2


Incremental search optimization #mssql

Adrian Wick
 

Hello all wizzards of Magic,

today i am turning to you about the old sin i have never fixed.

i have a table with 40k-50k records and incremental search is horrible. If i turn off index optimization, everything works, but
the records are not group up. So can someone give me a tip on how to build an index for the table. Here is some more info
about the table itself.

Columns:
1. counter (A10)
2. description (A40)
3. date1
4. date2
5. date3
6. ...

Indexes:
1. counter (unique) (its the only unique key in this table)
2. descritpion (nonunique) (this field is not used in any other index!)
3. date1 + description (nonunique)
4. ...

The problem is incremental search on column "description". So i guess the problem is the 2nd index. Should it also have a counter as a 2nd segment of the index?
Like description + counter? Should 1st index be clustered index? I have made 11 differend tables with differend variations and the best combination is:
1. counter (unique) + clustered
2. description + counter

And this is only for the table itself to start working the way it should. I also have 8 link queries in that window and 2 subforms ... And, if i read correctly, it also matters the number of
records that are shown in the table, because the array on the table is 0, it means that it fetches the number of records * 5 ... So if i have 30 records online, does that mean that it
fetches 150 main recrods and since i have 8 link queries, this means 150 * 8 = 1200? And to put the cherry on the top :) i use descending order in task->range/locate->expressions for
range and locate

Any info is much appreciated!

Regards,
A


Re: connecting to magic broker over HTTPs

Andreas Sedlmeier
 

Hi Adam.

You do not need to do anything on Magic side. Encryption is from your client to IIS.

You need to configure SSL/TLS (https) correctly in your IIS which is a bit more than just allowing the protocol (install a certificate, ...). You should find documentation for that.

Best regards,

Andreas


Re: Httpcall

gac@...
 

Hello,

Request Example (www.yeastar.com)  https://help.yeastar.com/en/s-series-developer/api/api_login.html

URL           (alpha)       'https://127.0.1.7:8088/api/v1.1.0/'
Login         (alpha)       '{"username": "gaclerc", "password": "xyz", "port": "443"}'
Contexte    (alpha)       'Content-Type:application/json'', ''charset=utf-8'

returnvalue (blob)  = HTTPCall('POST',Trim(URL) & 'login',Trim(Login),Trim(Contexte)

Best regards

gac@...


connecting to magic broker over HTTPs

Jackson, Adam
 

Hi,

 

I have a magic broker running on a server and can connect to it using http protocol no problem but I would like to switch it to use https as well because I want to embed the URL into SharePoint or Teams pages. I have changed “Allowed Protocols” on the site to https which allowed me to add my URL as a website to the Teams site but it failed to open it. Is it even possible what I’m trying to do and if so doe s anybody know what do I need to do?

 

Xpa 2.5, IIS 8.5.9600 on windows 2012 r2 server, magic license is MGENT1

 

TIA

 

Adam

 

 

 

 

Adam
Jackson
Manager, Business Systems
T  +447949892482
M  +447949892482
E  adam.jackson@...
McLaren Formula 1 Team
McLaren Technology Centre
Chertsey Road, Woking
Surrey, GU21 4YH, UK
mclaren.com
Facebook
Instagram
LinkedIn
Twitter
YouTube

The contents of this e-mail are confidential and for the exclusive use of the intended recipient. If you are not the intended recipient you should not read, copy, retransmit or disclose its contents. If you have received this email in error please delete it from your system immediately and notify us either by email or telephone. The views expressed in this communication may not necessarily be the views held by McLaren Racing Limited.
McLaren Racing Limited, McLaren Technology Centre, Chertsey Road, Woking, Surrey, GU21 4YH, UK. Company Number: 01517478


Re: Httpcall

Lei Salcedo
 

Been struggling with this for a while now. How were you able to work this one out? Your answer will be greatly appreciated.


Problem with the iOS Push Certificate

Wolfgang Mayer
 

hello everybody!
 
have a problem with the ios push certificate.
had to extend it and since then no message has been sent.
 
I exported it again as * .p12. on the MAC it works perfectly via a test program and my APP receives the message.
the same certificate does not work in the magic program "CN20_Send Pus Notification Message". But I don't get any error messages either, nothing.
 
has Apple changed something again?
can I enter the bundle id in the magiccode? maybe it is because of it.
 
who has experience with it?


Java Call and Retunr of a String

Dioni Santos
 

I have the follwing simple java.

public String tse01(String a)
{
    a = "TSE Return yyyswdefrg";
    
    return a;

}

I call it "JCall (A,'tse01','(V)V','A')"

and i get a "Type missmatch in parameter"

any idea, i need some help.



I want to call it with jcall, but i get allways


Re: Problem with HTTPPost in XPA3.3

Graham White
 

Hi Sherm,

I am not 100% sure what you mean but if it is putting "-F grant_type=client_credentials -F client_id=OURCLIENTID -F client_secret=OURCLIENTSECRET -F scope=https://graph.microsoft.com.default" in a blob and then using that as the body in the HTTPPost it does not work either. 

Regards
Graham White 


Re: Problem with HTTPPost in XPA3.3

sherman levine
 

Can you send separate parameters in HTTPPost instead of a composite, paralleling this curl template (%%1, %%2 etc are stored variables which are replaced at runtime in creating the CURL.BAT)

  curl -s -o "%%5" -X POST -F "client_id=%%1" -F "client_secret=%%2" -F "grant_type=client_credentials" -F "resource=%%3"  "https://login.microsoftonline.com/%%4/oauth2/token"

Sherm

On 5/11/2021 9:57 PM, Graham White wrote:

Hi Todd,

Thanks for that.  I put the code through the link you sent and it came back with this

grant_type%3Dclient_credentials%26client_id%3D{OURCLIENTID}%26client_secret%3D{OURCLIENTSECRET}%26scope%3Dhttps%3A%2F%2Fgraph.microsoft.com%2F.default

I tried this in both curl and my program and get the same error as I had before and I also get this error in curl using this above instead of what i had before.

Any ideas?

Graham



Re: Problem with HTTPPost in XPA3.3

Graham White
 

Hi Todd,

Thanks for that.  I put the code through the link you sent and it came back with this

grant_type%3Dclient_credentials%26client_id%3D{OURCLIENTID}%26client_secret%3D{OURCLIENTSECRET}%26scope%3Dhttps%3A%2F%2Fgraph.microsoft.com%2F.default

I tried this in both curl and my program and get the same error as I had before and I also get this error in curl using this above instead of what i had before.

Any ideas?

Graham

1741 - 1760 of 195966