[r63b] Can't place two of same furnis!

Baevus

the names ethan
Nov 4, 2012
565
47
Basically
kTLdAEXyOn40.png

^ taken from;

Everytime I buy one of the same furni or place one of the same that happens!

MySQLlog:
INSERT INTO items (base_item, user_id) VALUES (1622, 2)
MySql.Data.MySqlClient.MySqlException (0x80004005): Field 'extra_data' doesn't have a default value
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int64& insertedId)
at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteScalar()
at Database_Manager.Database.Session_Details.QueryAdapter.insertQuery() in c:\Users\Administrator\Desktop\Silverwave Emulator\DatabaseManager\Database_Manager\Database\Session_Details\QueryAdapter.cs:line 164

Please help!
 

Baevus

the names ethan
Nov 4, 2012
565
47
That my friend is in your emulator. It's a bug, you would have to fix the code in it
Fixed with a sql code. Didn't fix mine.
at Database_Manager.Database.Session_Details.QueryAdapter.insertQuery() in c:\Users\Administrator\Desktop\Silverwave Emulator\DatabaseManager\Database_Manager\Database\Session_Details\QueryAdapter.cs:line 164 I'll look there now.
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
That is due to yours being a different error to that thread. You need to run a different query, this one:

PHP:
ALTER TABLE `items`
MODIFY COLUMN `extra_data`  varchar(0) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
 

Baevus

the names ethan
Nov 4, 2012
565
47
That is due to yours being a different error to that thread. You need to run a different query, this one:

PHP:
ALTER TABLE `items`
MODIFY COLUMN `extra_data`  varchar(0) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';

[SQL]ALTER TABLE `items`
MODIFY COLUMN `extra_data` varchar(0) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
[Err] 1406 - Data too long for column 'extra_data' at row 2
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
[SQL]ALTER TABLE `items`
MODIFY COLUMN `extra_data` varchar(0) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
[Err] 1406 - Data too long for column 'extra_data' at row 2

My bad, I'm half asleep, I had the length as 0 (Silly me D: ).

Try the following:
PHP:
ALTER TABLE `items`
MODIFY COLUMN `extra_data`  text CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL;

(Notice it's text and not varchar, it should be better for custom items that you may use, that require a higher length than 50 chars).
 

Baevus

the names ethan
Nov 4, 2012
565
47
My bad, I'm half asleep, I had the length as 0 (Silly me D: ).

Try the following:
PHP:
ALTER TABLE `items`
MODIFY COLUMN `extra_data`  text CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL;

(Notice it's text and not varchar, it should be better for custom items that you may use, that require a higher length than 50 chars).
Sorry to be a pain... :l but its still saying error caught in query and same error comes up.
INSERT INTO items (base_item, user_id) VALUES (1622, 2)
MySql.Data.MySqlClient.MySqlException (0x80004005): Field 'extra_data' doesn't have a default value
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int64& insertedId)
at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteScalar()
at Database_Manager.Database.Session_Details.QueryAdapter.insertQuery() in c:\Users\Administrator\Desktop\Silverwave Emulator\DatabaseManager\Database_Manager\Database\Session_Details\QueryAdapter.cs:line 164
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
uh, could you check the code, it looks like `extra_data` might be in another table and not the `items` table, could you get the table name? If you do, you could modify the above query.
 

Baevus

the names ethan
Nov 4, 2012
565
47
uh, could you check the code, it looks like `extra_data` might be in another table and not the `items` table, could you get the table name? If you do, you could modify the above query.
No, extra_data is in items :l The code worked but when I restarted EMU same thing happened.
 
Bump** Any help?
Error;

Error in query:
INSERT INTO items (base_item, user_id) VALUES (10355, 1)
MySql.Data.MySqlClient.MySqlException (0x80004005): Field 'extra_data' doesn't have a default value
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteScalar()
at Database_Manager.Database.Session_Details.QueryAdapter.insertQuery()
 
Now its about the room id being set to '' and 0 in database. this is all confusing.
 

Users who are viewing this thread

Top