Re: DataViewToHTML with direct SQL


Jackson, Adam
 

Correction: not character limit – direct SQL APG had made a long text column a Blob which the DataTo command did not like. Made it a long Unicode and all good

 

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 Jackson, Adam via groups.io
Sent: 25 May 2021 09:24
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 Steve,
Thanks, got it working though there seems to be some character limit on the data and column name arguments. When I restrict the columns so length of these are 257 chars it works. If I add one more column on to make length 273 it stops working Luckily, it also does not need the "Virtual." Bit at the beginning of the data variables or I would even get less columns in. I guess I'll have to use really short column names to get the file created, read it back in as a blob and replace short column names with the ones I actually want. As sometimes the case with Magic functionality - close but no cigar.

Thanks again for the help, regards,

Adam



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




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

Join main@magicu-l.groups.io to automatically receive all group messages.