Variable length column overflow whe using TFDLocalSQL - sqlite

I try to query a clientdataset (cdsSource) with TFDLocalSQL.
The clientdataset has persistent fields, some are stringfields, size 1.
I do a select * from cdsSource , and get an error : "Variable length column overflow".
I found the cause and the solution, but think this is not the way it should be:
The error occurs when the order of the field in the query is different from the order of the persistent fields.
I think the following picture is self-explaining.
It is clear that the data of column "volgnummer" is assigned to the field "NietOpLaadLijst"
the question is : Is this by design ? Or is it a bug ?
Whatever it is, it is extremly confusing .
kind regards,
Dirk Janssens.

Related

How to select rows that start with specified letter in Flutter using Moor

I have a table called Items with a column called Name. How can I do a query to get only items that start with a certain letter?
For example if I wanted all items that start with words R2. I tried the code below but its wrong :
Future<List<Item>> getFilteredItems() => (select(items)..where((t) => t.Name.like('R2'))).get();
What is the proper to write the query?
All aspects of your questions beyond simple SQLite are beyond my knowledge.
But turns out (confirmed by OP) that my first doubt solved the problem:
Use 'R2%' instead of 'R2'. I.e. use the proper SQLite wildcard.

How to list unique values of a particular field in Kibana

I am having a field named rpc in my elasticsearch database and I am displaying it using Kibana. When I search in search bar of kibana like:
rpc:*
It display all the values of rpc field but I want to have only those value to be displayed which are unique.
I have been playing around with Kibana4 since a couple of weeks now. I find it intuitive and simple and the experience has been great till now. Following your question, I tried getting unique results via a Data Table visualization. Why? Because I personally find it easier to understand. Following are the steps:
1. Get unique count
Create the visualization (Visualize -> Data Table). First lets get
the count of how many unique entries we have for a particular field
(We will use this in the later part for verification). I'm using
clientip.raw but as I see, it will work just fine with any friendly
field name too.
2. Set the aggregation right
Set you aggregation back to count and have a Split Rows as follows. Not doing this will give you count 1 for each field value (since it is looking for unique counts) when you populate the table. Noteworthy part is setting the Top field to 0. Because Kibana won't let you enter anything else than a digit (Obviously!). This was the tricky part. Hit Apply and you'll get the results. Unique field values and the count of each of them.
3. Verification:
Going to the last page of the table, we see there are exactly 543 results. This is how I know it works.
What Next?
You save this visualization and add it to a Dashboard. There you can always check the request, query, response and other stats.
Just an addition to the above mathakoot answer.
For the user of newer version (which do not allow bucket size of 0 anymore) just set a value greater than the maximum number of result
And report the value in the Options>Per Page field
I am using Kibana 6 so the UI looks a bit different than the older answers here.
Here is what worked for me
Create a visualization from your query, I used a line graph type (don't think it matters)
Under Data, set metrics aggregation = "Unique Count" and set field to your field.
Set x-axis aggregation = "Terms" and set field to your field.
Set Size > your number of records
Under Metrics and Axes, disable drawing of the graph, circles, and labels (this really helps the UI not lag)
Run query and then click "Inspect" and download CSV
Data
Metrics & Axes
I wanted to achieve something similar but I'm stuck with Kibana 3.1.
I simply added a panel of type "TERMS" and configured its Field = User-agent and left everything else on default values. This gave me a nice bar chart with one bar for each User-agent.

Generate Number with Validating rule in Access

I have a database in access for institute. there is a [Registers] Table and [Certificates] Table.
I want to give Mark to each of Registers a Mark. I want to set Validation Rule for Each
If [Certificates].[Mark]>70
Then UpdateRecord
SetField
CertificateID "GENERATE AutoNumber"
My Problem is i cant handle the CertificateID Generate with Macro. i cant use DMAX.
looking for a solution to give CertificateID to only Registers who passed the Course.
Tried "After Update" Macro and "After Insert" macro but still didnt success.
is there any other way to give AutoNumber except "DMax"?
Well, i just already found a way but not the best way.
I just added another Table as "Certificates" and renamed current(Certificates) to "Marks".
Tables and Fields
i made a query with Select a "Grade" from Certificates Table and rest from Marks. Whenever i fill a record in Grade table it generate Autonumber for "CertificateID" a new number.
For Validation i set my validation Rule in my form on Grade which i cant fill that field if Marks.Mark is less than 70. ( [Marks].[Mark] < 70)
I know its not a good way.
Still looking for better answer

Determine if a value is flagged as Unknown Value

Recently Freebase added flags for values: Has No Values and Has Unknown Values. If I query a property's value it will give me null if it is empty or has one of these flags. How do I determine if the value really is empty or if it's flagged?
A good place to find out about something that you see on freebase.com is the source code that drives the site. In particular, for this case:
https://code.google.com/p/freebase-site/source/browse/trunk/www/lib/propbox/js/propbox-edit.js#640
The properties that you need to query are:
/freebase/valuenotation/has_no_value
/freebase/valuenotation/has_value
Here's an example:
https://www.freebase.com/m/05r3dj?links&lang=en&filter=%2Ffreebase%2Fvaluenotation%2Fhas_value

how to display multiple select list after node submit

I have been reading around and just havent found any type of answer.
I have a multiple select list and need to take the the values of the multiple select and pass them to an API call.
But I dont understand how drupal renders the multiple select list and how to habdle this.
Can someone please explain this to me or if you have come across any docs that explain this, please point me in the right direction.
Also, when I try to write the select to the db, I always get a the value 1... never changes...
Any help is appreciated :)
Solved:
The Multiple select is stored in an associative array where the key value pair are taken from the key value of the list, this means that both the key and value get the same value.
I did this by using devels dvm(); function which displays the array in the message area after the node was saved.

Resources