Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
gene_klayman
Contributor

QVX storing a long field as a date

I have a QvxTable with a QvxField defined as

QvxField(rowName, QvxFieldType.QVX_SIGNED_INTEGER, QvxNullRepresentation.QVX_NULL_FLAG_SUPPRESS_DATA, FieldAttrType.INTEGER);

My data source returns a value of 6290512.

For some reason when I store this value into the QvxField defined above, I get an error

001814     2012-09-10T16:21:54.973-04:00     FIRMWIDE\aminfrpt     Notice          Value 6290512

001815     2012-09-10T16:21:54.975-04:00     FIRMWIDE\aminfrpt     Error           QVX_UNKNOWN_ERROR: Not a legal OleAut date.. Stack trace written to C:\ProgramData\QlikTech\Custom Data\QvTIDMConnector\Log\StackTrace.txt

Here's the Stack Trace:

System.ArgumentException: Not a legal OleAut date.

   at System.DateTime.DoubleDateToTicks(Double value)

   at QlikView.Qvx.QvxLibrary.QvxDataValue..ctor(Double value)

   at QvTIDMConnector.TableCreator.AddValueToRow(QvxDataRow row, QvxField field, Object val)

The interesting item is why is the value being converted to a Date?

Tags (1)
1 Solution

Accepted Solutions
gene_klayman
Contributor

Re: QVX storing a long field as a date

Issue resolved.

Turns out when your QVXField is defined as FieldAttrType.Integer, you cannot set that field as a long, or anything else other than an int.

Int a = 12312000;   <- ok

Long a = 12312000; <- error


QVXField = a;

1 Reply
gene_klayman
Contributor

Re: QVX storing a long field as a date

Issue resolved.

Turns out when your QVXField is defined as FieldAttrType.Integer, you cannot set that field as a long, or anything else other than an int.

Int a = 12312000;   <- ok

Long a = 12312000; <- error


QVXField = a;

Community Browser