[R63B] MySQL Error

Stevee

Posting Freak
Mar 29, 2011
580
35
Hello, I'm using BcStorm (Edited) but I'm getting this my SQL error..



Error in query:
INSERT INTO rooms (roomtype,caption,owner,model_name) VALUES ('private',@caption,@username,@model)
MySql.Data.MySqlClient.MySqlException (0x80004005): Field 'description' doesn't have a default value
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)
at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& 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()


Any suggestions on what I should do to fix this? Yes I have attempted to fix this myself.

Thank you.
Steve
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
You need to give the field 'description' a default value in the `rooms` table. You can run this query to do it:

PHP:
ALTER TABLE `rooms`
MODIFY COLUMN `description`  varchar(200) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '' AFTER `owner`;
 

Stevee

Posting Freak
Mar 29, 2011
580
35
You need to give the field 'description' a default value in the `rooms` table. You can run this query to do it:

PHP:
ALTER TABLE `rooms`
MODIFY COLUMN `description`  varchar(200) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '' AFTER `owner`;
Now I get this error here:

Error in query:
INSERT INTO rooms (roomtype,caption,owner,model_name) VALUES ('private',@caption,@username,@model)
MySql.Data.MySqlClient.MySqlException (0x80004005): Field 'public_ccts' doesn't have a default value
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)
at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& 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()
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
You now need to give public_ccts a default value, so run this:
PHP:
ALTER TABLE `rooms`
MODIFY COLUMN `public_ccts`  varchar(200) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
 

Stevee

Posting Freak
Mar 29, 2011
580
35
You now need to give public_ccts a default value, so run this:
PHP:
ALTER TABLE `rooms`
MODIFY COLUMN `public_ccts`  varchar(200) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';

Now after setting a default value to those two above and tags, wallthickness, floorthickness, and passwords... Then I restarted my emulator now I get this error:



 

Stevee

Posting Freak
Mar 29, 2011
580
35
Open up the emulator and open up RoomData.cs and go to line 238 and show me what is there.

On line 238 it has: this.FloorThickness = (int) Row["floorthickness"];



PS: @Sledmore

this is the "critical error" I get when I debug it/run it..


TokenID: 0Invalid Dario bug duing user login: System.InvalidCastException: Specified cast is not valid.
at Butterfly.HabboHotel.Rooms.RoomData.Fill(DataRow Row) in c:\Users\Administrator\Desktop\Emulator\BcStorm\Butterfly\HabboHotel\Rooms\RoomData.cs:line 238
at Butterfly.HabboHotel.Rooms.RoomManager.FetchRoomData(UInt32 RoomId, DataRow dRow) in c:\Users\Administrator\Desktop\Emulator\BcStorm\Butterfly\HabboHotel\Rooms\RoomManager.cs:line 103
at Butterfly.HabboHotel.Users.UserDataManagement.UserDataFactory.GetUserData(String sessionTicket, String ip, Byte& errorCode) in c:\Users\Administrator\Desktop\Emulator\BcStorm\Butterfly\HabboHotel\Users\UserDataManagement\UserDataFactory.cs:line 279
at Butterfly.HabboHotel.GameClients.GameClient.tryLogin(String AuthTicket) in c:\Users\Administrator\Desktop\Emulator\BcStorm\Butterfly\HabboHotel\GameClients\GameClient.cs:line 241
 
Last edited:

Users who are viewing this thread

Top