This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to change Field Data Type

Tags: None
(comma "," separated)
User avatar
iwhitfield
Registered Member
Posts
33
Karma
0
OS

How to change Field Data Type

Sat Jul 23, 2016 10:26 am
Hi All

Seem to now have Kexi working "sort of OK". After a total re-build.
Still waiting for details on how to get Combo Boxes to work.
I noticed also that some Labels that I put in on the design screen did not show up on the data screen. Deleting them and re-inserting them seemed to fix it.

One problem I can't crack is how to change Field Types.
I found I had set a photo Field as 'Text' by mistake so tried to change it.
When you save however I get a message that saving will remove all data from the Table (??)
I then tried to export the Table first but can find no way to export it.

So my question is how do I do this without losing all my data??

Thanks a lot.
User avatar
jstaniek
Moderator
Posts
1027
Karma
2
OS

Re: How to change Field Data Type

Sat Jul 23, 2016 9:31 pm
Good that more things work now. I am curious how did you "re-build"?

iwhitfield wrote:I noticed also that some Labels that I put in on the design screen did not show up on the data screen. Deleting them and re-inserting them seemed to fix it.


Could you explain it more in a bit detailed way? I wouldn't like possible bugs go unnoticed. Thanks.

iwhitfield wrote:One problem I can't crack is how to change Field Types.
I found I had set a photo Field as 'Text' by mistake so tried to change it.
When you save however I get a message that saving will remove all data from the Table (??)
I then tried to export the Table first but can find no way to export it.

So my question is how do I do this without losing all my data??


Not unusual question. Please look at this thread for links showing 10th anniversary of this wish :) : viewtopic.php?f=221&t=132264


Best regards,
Jarosław Staniek
• Qt Certified Specialist
KEXI - Open Source Visual DB Apps Builder
• Request a feature or fix for KEXI here
May I help you? Please mention your app's version and OS when asking for help
User avatar
iwhitfield
Registered Member
Posts
33
Karma
0
OS

Re: How to change Field Data Type

Sat Jul 23, 2016 10:25 pm
Thanks Jaroslaw

By "re-build" I mean that I removed the Kexi program completely, searched for any other Kexi files and removed those as well. Then re-installed Kexi. And then re-created my Table and Form completely. While working with Kexi I have now been saving frequently, about every 5mins and this seems to stop the program crashing. In the last two days I've only had one crash.

I laid out my Form design putting Labels above each Text Box. When I change the view to 'Data" three of the Text Boxes showed no Labels. On checking the Design screen they were showing still as I had designed them. What I tried was to delete them and re-insert them and then they appeared correctly in the Data view. I did not change anything just removed them and re-inserted them as originally so something was effecting them.

You did not reply to my previous post - I'm still needing to understand exactly how Combo Boxes work as per the layout I gave you.

I looked at the post about "losing" data in a Table when you change something and understand now the background to this. However you did not tell me how to export my data from the Table. This seems to be the only way to get round this. Export the data > Make the change in the Table > re-import the data. Please let me know about this.

Thanks a lot.
User avatar
jstaniek
Moderator
Posts
1027
Karma
2
OS

Re: How to change Field Data Type

Sun Jul 24, 2016 1:12 pm
Regarding combo boxes this is possible to find in this forum: viewtopic.php?f=221&t=132140.

If someone on this forum is willing to assist you step-by-step, please do so, as teamwork is the best approach. So Kexi authors can spend some time on actual development. :)

I also explained the status of documentation in this regard.

As for current workaround for lack of full table schema altering, yes, export a table to CSV file and then import it carefully choosing data types on import. Depending on what types you need, exporting and importing can be more or less precise. For example let's not expect images to be exported and imported perfectly. Or sometimes date and time.

The "export data to file" and "import data from file" are commands you would need.
https://userbase.kde.org/Kexi/Handbook/ ... l_Data_Tab

Features of CSV is documented here https://userbase.kde.org/Kexi/Handbook/ ... ues_Format


Best regards,
Jarosław Staniek
• Qt Certified Specialist
KEXI - Open Source Visual DB Apps Builder
• Request a feature or fix for KEXI here
May I help you? Please mention your app's version and OS when asking for help
User avatar
jstaniek
Moderator
Posts
1027
Karma
2
OS

Re: How to change Field Data Type

Sun Jul 24, 2016 1:21 pm
By "re-build" I mean that I removed the Kexi program completely, searched for any other Kexi files and removed those as well. Then re-installed Kexi. And then re-created my Table and Form completely. While working with Kexi I have now been saving frequently, about every 5mins and this seems to stop the program crashing. In the last two days I've only had one crash.


You must have reasons for that but out of curiosity why did you remove all you files/documents created with Kexi? Or do you mean configuration?
I am trying to understand the reasoning to better explain things in documentation etc.

Also what do you mean by saving every 5 minutes? Do you mean saving the design of form, report, etc? Asking because data in records you enter is saved automatically as soon as you move to other record, exit the data view or accept changes. There is no "Save to file" for data as our storage medium database and individual element saved is record.

Good to hear you achieved better stability. I would be grateful if you mention in what circumstances do you get the crashes of Kexi. Sorry if you already explained this somewhere.


Best regards,
Jarosław Staniek
• Qt Certified Specialist
KEXI - Open Source Visual DB Apps Builder
• Request a feature or fix for KEXI here
May I help you? Please mention your app's version and OS when asking for help
User avatar
jstaniek
Moderator
Posts
1027
Karma
2
OS

Re: How to change Field Data Type

Sun Jul 24, 2016 1:30 pm
I laid out my Form design putting Labels above each Text Box. When I change the view to 'Data" three of the Text Boxes showed no Labels. On checking the Design screen they were showing still as I had designed them. What I tried was to delete them and re-insert them and then they appeared correctly in the Data view. I did not change anything just removed them and re-inserted them as originally so something was effecting them.


Just one case I was able to guess is that you might assign data source to your label.
Example of how form i ndata view looks if the same data source is assigned to a label and a text box:

Image

In this case whatever text you supplied to the label in your form design, it will be replaced by data obtained from the table field you have assigned to that label. This may be confusing as there's no warning displayed: labels definitely fully supporting data source assignment so there's no point to warn. If my guess is OK solution is to remove data assignment from the label (and you have done just that by removing and recreating the label(s)).

In design time the label and the box look like below. Please note that the box has a [>] icon indicating a data source assignment while the label still displays its text without such icon. This may area for a small improvement so user can easily see a difference between label with static text and label with data source assigned (the former being more typical case). Added a bug here https://bugs.kde.org/show_bug.cgi?id=366037

Image


Best regards,
Jarosław Staniek
• Qt Certified Specialist
KEXI - Open Source Visual DB Apps Builder
• Request a feature or fix for KEXI here
May I help you? Please mention your app's version and OS when asking for help
User avatar
iwhitfield
Registered Member
Posts
33
Karma
0
OS

Re: How to change Field Data Type

Mon Jul 25, 2016 12:27 pm
Thanks for your replies Jaroslaw - appreciated!!

In Reply ...

Regarding combo boxes this is possible to find in this forum: viewtopic.php?f=221&t=132140.


You have sent me this link twice already and I can not understand it or get it to work!! As I asked before if I have a Table called "Members" with 4 Fields (Key Field, FirstName, Surname and Status) can you tell me what to put in each of the three boxes that come up when you select Combo Box in the Table layout??

Just one case I was able to guess is that you might assign data source to your label.


No!! All my Labels were done the same way. I select 'Label Box' position and size it where I want it and then type in the label wanted.

Why did you remove all you files/documents created with Kexi? Or do you mean configuration?


Because I was having lots of problems (as reported) so decided to start again with a totally fresh installation!! NOT a re-configuration.
I still have the problem of the new installation still listing the three old test DBs I created during my first experiment with Kexi. So as I asked before - where is this History stored and how do I get rid of it??

Also what do you mean by saving every 5 minutes?


As I was getting frequent crashes (as reported) I decided to try more frequent saves. I came across this problem with another program some years back - something to do with Memory allocation if I remember correctly. So while I was re-designing my Form I was saving about every 5 mins and this seemed to cure the problem

The "export data to file" and "import data from file" are commands you would need.


Under the 'External Data' tab I have NO "Export to file" showing at all. Only "Import Data from file" and "Import Tables"!! (??)

Last of all I have discovered another "funny". I have a group of 5 fields on my Form that are marked to use Blue foreground colour and italics. However when you view these fields in the Data screen this is very random. Some are right and some default to plain black regular font. This varies from field to field it's not just one or more but any of the five across each record.
Any comment on this??

Thanks again
User avatar
jstaniek
Moderator
Posts
1027
Karma
2
OS

Re: How to change Field Data Type

Mon Jul 25, 2016 2:10 pm
iwhitfield wrote:You have sent me this link twice already and I can not understand it or get it to work!! As I asked before if I have a Table called "Members" with 4 Fields (Key Field, FirstName, Surname and Status) can you tell me what to put in each of the three boxes that come up when you select Combo Box in the Table layout??


Then I'd like to ask you for the file that you created (if I don't have it already). As you know it's better to teach how to use a tool than sending everything ready to consume.

No!! All my Labels were done the same way. I select 'Label Box' position and size it where I want it and then type in the label wanted.


Then I'd like to ask you for the file, that's the simplest approach.

Because I was having lots of problems (as reported) so decided to start again with a totally fresh installation!! NOT a re-configuration.
I still have the problem of the new installation still listing the three old test DBs I created during my first experiment with Kexi. So as I asked before - where is this History stored and how do I get rid of it??


Please refer to viewtopic.php?f=221&t=109276. This forum seems to provide many answers already :)

As I was getting frequent crashes (as reported) I decided to try more frequent saves. I came across this problem with another program some years back - something to do with Memory allocation if I remember correctly. So while I was re-designing my Form I was saving about every 5 mins and this seemed to cure the problem


OK so I'd like to know if you are able to cause the crash and provide me the list of steps. "Random crashes" if that's really true is with 99% probability a hardware problem. I assure you we have no random crashed implemented intentionally :)

Under the 'External Data' tab I have NO "Export to file" showing at all. Only "Import Data from file" and "Import Tables"!! (??)


I was curious if beginners are able to discover commands. There are two places:

http://wstaw.org/m/2016/07/25/plasma-desktopfl1863.png
http://wstaw.org/m/2016/07/25/plasma-desktopWJ1863.png

The second one works without even opening a table. Both work also for queries.

Last of all I have discovered another "funny". I have a group of 5 fields on my Form that are marked to use Blue foreground colour and italics. However when you view these fields in the Data screen this is very random. Some are right and some default to plain black regular font. This varies from field to field it's not just one or more but any of the five across each record.
Any comment on this??


As usual, please send me the sample kexi file and to be a decent forum member you can also publish screenshots here in the forum.

Thanks for this helpful feedback so far!


Best regards,
Jarosław Staniek
• Qt Certified Specialist
KEXI - Open Source Visual DB Apps Builder
• Request a feature or fix for KEXI here
May I help you? Please mention your app's version and OS when asking for help
User avatar
iwhitfield
Registered Member
Posts
33
Karma
0
OS

Re: How to change Field Data Type

Tue Jul 26, 2016 12:41 pm
Hi Jaroslaw

I posted a reply to you yesterday with a couple of Screen Grabs and it did not go through!!
I re-posted again this morning the same thing and it has also not gone through!!

It must be something with the Screen Grabs.
I capture a Screen Grab and save it as a PNG file. I then upload it to my Google Drive, mark it as "Shared" and get the Link to it. And I can view them successfully on Google Drive.
I then insert this link into the Kexi post using the 'img' tag.

I do notice an error box about not being able to determine the size of the image comes up when I submit the post.
The two images are 18.6Kb and 54.7Kb in size only.

What am I doing wrong??
User avatar
jstaniek
Moderator
Posts
1027
Karma
2
OS

Re: How to change Field Data Type

Tue Jul 26, 2016 1:28 pm
I recommend wstaw.org or imgur.com sites. While not the best, still better than personal Drive that can disappear after a while and thus degrading value of this forum. Images posted there can be either linked or used in the img tag.


Best regards,
Jarosław Staniek
• Qt Certified Specialist
KEXI - Open Source Visual DB Apps Builder
• Request a feature or fix for KEXI here
May I help you? Please mention your app's version and OS when asking for help
User avatar
iwhitfield
Registered Member
Posts
33
Karma
0
OS

Re: How to change Field Data Type

Tue Jul 26, 2016 2:13 pm
Let me try using a URL Tag
This is the first image showing no "Export to File" ...

https://drive.google.com/file/d/0B4QRSiSnDQQjcXA4OFhlcGVPQkE/view?usp=sharing
User avatar
iwhitfield
Registered Member
Posts
33
Karma
0
OS

Re: How to change Field Data Type

Tue Jul 26, 2016 2:19 pm
OK - That seems to work.

Here is the second image also showing no "Export to File".

https://drive.google.com/file/d/0B4QRSiSnDQQjYnlMVjFSUVhPbzg/view?usp=sharing

Also I've just realized that to carry on experimenting with Kexi I set the 13 Combo Boxed I need in my Form to 'Text' as I can't get Combo Boxes to work yet. So, I will have to crack the Export to File problem to fix this and the one Photo Box I mis-Typed before I can do anything else. Once I have this right I'm happy to send you a copy of my file, (in confidence of course).

Thanks for the LINK to the History file - that sorted out the problem!!!!

The crashes I was getting were while I was Designing my Form. As I said I tried again saving about every 5mins and this seemed to work.
I must say - I have been working with my Database for the past few days and Kexi has been Rock Solid!! I've had no crashes or any kind of hiccup at all!! I'm very happy and impressed. So the problem I experienced must have something to do with the 'Design Mode'!!??

I'm happy to help out in any way and send in what I find and the problems that I encounter!!
User avatar
jstaniek
Moderator
Posts
1027
Karma
2
OS

Re: How to change Field Data Type

Tue Jul 26, 2016 2:47 pm
Thanks for sending more info. The Export is in two other places as mentioned before, but the Import, Export or Send is a place holder may be filled with more options if you have newer Kexi (not yet available) or more plugins installed (not everything is published). That's can give many many more options.

I've had no crashes or any kind of hiccup at all!! I'm very happy and impressed. So the problem I experienced must have something to do with the 'Design Mode'!!??


Crashes can be also related with third-party software like the Oxygen widget style or something even more subtle. Or it can be with specific type of widget, like combo box only. I've seen such reports and after changing widget style crashes disappeared. For such reason we need precise reports: if you click on the Report Bug button in this dialog

https://techbase.kde.org/File:Kde-crash-handler.png

(if it appears at all - it should be), as many users do, I'd receive more usable report with pointer to the real issue.

EDIT: To limit risks of instability coming from 3rd-party components In KEXI 3 we're precisely setting default for selection of icons and styles. So default (and officially supported) KEXI would look and work largely the same on for all users on all OSes.

PS: I encourage using public sites like wstaw.org or imgur.com to save our total time.


Best regards,
Jarosław Staniek
• Qt Certified Specialist
KEXI - Open Source Visual DB Apps Builder
• Request a feature or fix for KEXI here
May I help you? Please mention your app's version and OS when asking for help
User avatar
iwhitfield
Registered Member
Posts
33
Karma
0
OS

Re: How to change Field Data Type

Wed Jul 27, 2016 9:13 am
Hi Jaraslaw

Thanks for the input. In reply

RE: Export to File - As I explained to you, and sent in Screen Grabs, I have NO "Export to File" showing up in either of the two locations you mentioned - Kexi > Import, Export or Send and in the External Data Tab.
So is it even possible to export my data out to a CSV file and if so How and Where??

Combo Boxes: I have asked this question many times - originally earlier this year when I first tested Kexi and now currently in this and another thread. I have received no definitive answer at all and am starting to wonder if these Combo Boxes work at all!! The only reply I have received is a link to a post that I can not understand or get to work!!
My current attempt is as follows ...
Setup Table - https://drive.google.com/file/d/0B4QRSiSnDQQjbERmRnZQakxaZ0E/view?usp=sharing
You can see I have set the Combo Box source to the Table and set the Bound Column and the Visible Column to the Status Field.
Enter Test Data - https://drive.google.com/file/d/0B4QRSiSnDQQjRjJRMHF0c0ZMSFU/view?usp=sharing
Setup Form - https://drive.google.com/file/d/0B4QRSiSnDQQjOVpHQnBId1dyYTQ/view?usp=sharing

You will see the Combo Box is greyed out but does show the value of that record.
As soon as I try to press the down arrow Kexi crashes with the following Crash Information ...

Application: Kexi (kexi), signal: Segmentation fault
[Current thread is 1 (process 27221)]

Thread 1 (process 27221):
#0 0x00007f1a1c9b1fdd in ?? ()
#1 0x0000000000000000 in ?? ()


I do hope you can give me positive answers to these questions. - Thanks.

PS - will post another question on Queries and Reports just now - I know you prefer a New Topic for this kind of thing!!
User avatar
jstaniek
Moderator
Posts
1027
Karma
2
OS

Re: How to change Field Data Type

Wed Jul 27, 2016 9:17 am
iwhitfield wrote:RE: Export to File - As I explained to you, and sent in Screen Grabs, I have NO "Export to File" showing up in either of the two locations you mentioned - Kexi > Import, Export or Send and in the External Data Tab.
So is it even possible to export my data out to a CSV file and if so How and Where??


I think I answered above:

I was curious if beginners are able to discover commands. There are two places:

http://wstaw.org/m/2016/07/25/plasma-desktopfl1863.png
http://wstaw.org/m/2016/07/25/plasma-desktopWJ1863.png

The second one works without even opening a table. Both work also for queries.


Best regards,
Jarosław Staniek
• Qt Certified Specialist
KEXI - Open Source Visual DB Apps Builder
• Request a feature or fix for KEXI here
May I help you? Please mention your app's version and OS when asking for help


Bookmarks



Who is online

Registered users: Bing [Bot], gfielding, Google [Bot], markhm, sethaaaa, Sogou [Bot], Yahoo [Bot]