Sybase ASE Errors - Getting ASA6525 and ASA6517 - sybase-ase

When attempting to insert a row into a table I get 2 errors - with one set of data I get ASA6525 contraint violation. With a different set of data I get ASA6517 constraint violation.
ERROR: [Sybase][ODBC Driver][SQL Anywhere]Constraint 'ASA6517'
violated: Invalid value in table 'emp_def' Error Code: -1091
I have been trying to figure out what the issue is - with no real success. The error only says invalid value in table with no guidance what value is not valid or how to find the answer.
Where do I look to find the details around these errors? We are running ASE v16.


Data truncated for column 'budget' at row 1"

I encountered this error when I attempted to insert something into a MySQL table. What's the possible reason? How to solve this problem?
The raw value of "budget" is 800元, when inserted, it became 800, 元 is missing.
This would mean that you are trying to insert data that would overflow the allocated storage for that column.
If your SQL Mode is set to strict, any insertion of data that would not fit, will cause an error and the insert will fail, if the mode is non-strict the insert will succeed with truncation giving a warning. But this should not be use as a workaround for this problem. Instead you need to identify the field which is causing this and should update the table to make it wide enough to accommodate the widest data your application might give MySql

Google BigQuery: Error: Invalid schema update. Field has changed mode from REQUIRED to NULLABLE

I'm trying to append the results of a query to another table.
It doesn't work and sends out the following error:
Error: Invalid schema update. Field X has changed mode from REQUIRED to NULLABLE.
The field X is indeed REQUIRED, but I don't try to insert any NULL-values into that specific column (the whole table doesn't have a single NULL value).
This looks like a bug to me. Anyone knows a way to work around this issue?
The issue is fixed after switching from Legacy SQL to Standard SQL.

Unknown column in field list during select query after column deleted

I keep getting an error message when I run a basic select query - not an insert or update - that tells me there is an unknown column in field list.
At one point there was a column by the name that the error is referring to but I have since restructured the database and there is no longer a column in that table by that name.
Interestingly enough this error only happens if I query the database from PHP. If I run a query directly on the server (using the SQL tab in phpMyAdmin) I get no error.
It sounds to me like there's a cache somewhere that I don't know about that needs to be cleared. Any ideas?
As to the comment about using a framework. I'm not using anything fancy, just basic PHP/MySQL. An example of when I get the error would be
$query = "SELECT * FROM table";
$relation = mysql_query($query) or die(mysql_error());
return $relation;
even running a test query would return an error of unknown column in field list which is odd since I'm not actually looking for a specific column but just trying retrieve everything. I've never run into this issue before. Usually unknown column occurs when you try to insert something into a column (or update a column) that is not there.
Depending upon your server installation, both mySQL and PHP can be configured to do some pretty aggressive caching. Try sending a "reset query cache" command. This instructs mySQL to clear its query cache. If the problem still exists, then you are likely looking at something cached in PHP.

Use php uniqid in mysql table name results in occasional errors - how do I avoid it?

Without getting into the lengthy details of why, I have a need to auto-generate mySQL tables that utilize a unique table name that incorporates the string generated by PHP uniqid function. When doing so, I occasionally (not always) get the following query error:
Invalid query: You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to
use near ''512e1d9518d44_tbl'' at line 1 Whole query: SELECT
SUM(p_count) AS 'pcnt' FROM 512e1d9518d44_tbl
I know I could use a simple cross reference lookup table, but is there another way to avoid the error, which I believe is the result of a violation of table naming rules, while still maintaining the table naming non-squential uniqueness? I've tried single quoting the table name but get the same result btw.
When your table / column name starts with a number, you have to escape it using backticks:
SELECT SUM(p_count) AS pcnt FROM `512e1d9518d44_tbl`

Joomla 2.5.3: MySQL-db: #1064 USING BTREE) ENGINE=InnoDB DEFAULT CHARSET=utf8

After a portover of the joomla version 2.5.3 from a lampp to webserver i have the following trouble: i cannot login to my admin-area: what happened!?
500 - An error has occurred.
Return to Control Panel
while porting over the db-tables via phpmyadmin all went nice but - suddenly i got the follwoing error... for the user table...
MySQL says ,,, [and i guess that it was told with a prefix - a preliminary notice that told me that the users-table was not ported over due to some errors... (guessing that the local and the "web-server-database are not 100 % simmilar and equvialent... What do you say!?
But - besides this - if you have a closer look at the number of tables then we see that there are tables missing... that is the important thing .... i cant help myself - there are several tables missiing.!!
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING BTREE
so then i have to do the portover of the users-table manually. but as i see now - there are more tables missing. approximatly 5 to seven tables were missing and - as mentioned above - i was not able to login
500 - An error has occurred.
Return to Control Panel
Some findings: Some friends told me that this has to do with the compliance of the dbs - the local db is not like the db at the webserver.
So i decided to reupload the complete db-stucture of the user-area .. that ar 5 to 7 [!?] tables, arent they!? So now i need to have some tables of the neweset joomla-version - i need the complete tables - everything that has to do with the "user" out of the joomla-version 2.5.4
Guess that these are the following tables:
Two questions: are these all the tables that i need? Can you tell me where to get them!?
Do your MySQL database versions match? You need to use the same version of MySQL on both machines or adjust the SQL to match the version on the production server.
Before MySQL 5.0.60, this option can be given only before the ON
tbl_name clause. Use of the option in this position is deprecated as
of 5.0.60 and support for it there will be removed in a future MySQL
release. If an index_type option is given in both the earlier and
later positions, the final option applies.
TYPE type_name is recognized as a synonym for USING type_name.
However, USING is the preferred form.