1. Claudius Sailer
  2. Valentina Database ADK
  3. Thursday, April 20 2017, 05:03 PM
  4.  Subscribe via email
I have an easy question but I can't solve the problem.

I added a new filed in a table (using viSQL for Xojo, Valentina 6.6.9)

ALTER TABLE EventName ADD EventArt VarChar(504)

UPDATE EventName set EventArt ='Maze‘

works also fine.



then I tried to change it to INDEXED and NOT NULL.

ALTER TABLE EventName MODIFY EventArt NOT NULL INDEXED

but this doesn’t work. What can I do that it works?
Comment
There are no comments made yet.
Ivan Smahin Accepted Answer
Actually you should repeat field definition:

ALTER TABLE EventName MODIFY EventArt VarChar(504) NOT NULL INDEXED
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 1
Ruslan Zasukhin Accepted Answer
My point is that Valentina Studio self execute SQL commands,
so developer can learn a lots from it.

Diagram tool allow to developer DRAW changes, then generate SQL commands for that changes. This is cool :)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 2
Claudius Sailer Accepted Answer
hmmmm sorry Ruslan....

I am old fashion and didn't know Valentina Studio. Thanks for help now it works. I have to learn using this handsome tool and not coder tool :o
I prefered SQL Commands ;) but in future I will have an eye on Valentina Studio.

Half a year ago I was working already with V4RB 4.4.8 and Valentina Studio was much newer. So It was unable to open old stuff database without changing the database. So I decided to use viSQL because it was compiled with same version the database was created. Now I am up to date and it works fine for me.

thanks

Claudius
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 3
Ruslan Zasukhin Accepted Answer
Hi Claudius,

1) why you use viSQL so long? Valentina Studio should be much better

2) in Valentina Studio, you can modify tables in GUI, and it seems to me, in log of vstudio must be visible SQL commands which it executes.

Another way - open again Valentina Studio, make new diagram, add your table,
then start do your changes
- mark field index
- add NOT NULL

then exists command Apply Changes, and it also should show generated SQL command(s).
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 4
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 0 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories
Omegabundle
  1. 0 subcategories