Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 06:16

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Weird Database problem

Discussion on Weird Database problem within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
Weird Database problem

when i Save the Chi Class Value by Inserting Method i get this Error
Code:
MySql.Data.MySqlClient.MySqlException (0x80004005): 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 '8,value 9,value 10,value 11) VALUES ('ShallWeDance',1,0,0,0,0)' at line 1
what iam doing wrong to get it ?

regards
shadowman123
shadowman123 is offline  
Old 04/01/2013, 15:52   #2
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 950
Post your sql query since that's what's causing it.
Super Aids is offline  
Old 04/01/2013, 16:29   #3
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
Saving Void
PHP Code:
public static void Save(Client.GameState clientbyte GroupNumber)
{
MySqlCommand cmd = new MySqlCommand(MySqlCommandType.INSERT);
                
cmd.Insert("chitable").Insert("Name"client.Entity.Name).Insert("LearnedClasses"GroupNumber++)
                   .
Insert("value " + (GroupNumber 4), client.Chi.ChiValues[GroupNumber 4])
                   .
Insert("value " + ((GroupNumber 4) + 1), client.Chi.ChiValues[(GroupNumber 4) + 1])
                   .
Insert("value " + ((GroupNumber 4) + 2), client.Chi.ChiValues[(GroupNumber 4) + 2])
                   .
Insert("value " + ((GroupNumber 4) + 3), client.Chi.ChiValues[(GroupNumber 4) + 3])
                   .
Execute();

Query
PHP Code:
-- ----------------------------
-- 
Table structure for `chitable`
-- ----------------------------
DROP TABLE IF EXISTS `chitable`;
CREATE TABLE `chitable` (
  `
Namevarchar(80CHARACTER SET utf8 NOT NULL,
  `
LearnedClassesmediumint(80NOT NULL DEFAULT '0',
  `
Value 0bigint(80NOT NULL DEFAULT '0',
  `
Value 1bigint(80NOT NULL DEFAULT '0',
  `
Value 2bigint(80NOT NULL DEFAULT '0',
  `
Value 3bigint(80NOT NULL DEFAULT '0',
  `
Value 4bigint(80NOT NULL DEFAULT '0',
  `
Value 5bigint(80NOT NULL DEFAULT '0',
  `
Value 6bigint(80NOT NULL DEFAULT '0',
  `
Value 7bigint(80NOT NULL DEFAULT '0',
  `
Value 8bigint(80NOT NULL DEFAULT '0',
  `
Value 9bigint(80NOT NULL DEFAULT '0',
  `
Value 10bigint(80NOT NULL DEFAULT '0',
  `
Value 11bigint(80NOT NULL DEFAULT '0',
  `
Value 12bigint(80NOT NULL DEFAULT '0',
  `
Value 13bigint(80NOT NULL DEFAULT '0',
  `
Value 14bigint(80NOT NULL DEFAULT '0',
  `
Value 15bigint(80NOT NULL DEFAULT '0'
ENGINE=InnoDB DEFAULT CHARSET=latin1
shadowman123 is offline  
Old 04/01/2013, 16:31   #4
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Your issue is that the sql wrapper you're using doesn't support spaces in field or table names.

Re-name your tables to not contain a space, re-write the sql wrapper or write your own sql system (or use nhibernate <3)
pro4never is offline  
Old 04/01/2013, 18:58   #5
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
After alot of Trial and Error i Discovered that the Problem was .. the MySQL Command doesnt allow inserting at columns that contain numbers in their name

This can be Closed Now
shadowman123 is offline  
Old 04/02/2013, 01:18   #6
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Unless you have an updated version of the wrapper it also has an issue with spaces in column names.
pro4never is offline  
Old 04/02/2013, 01:51   #7
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
Yea .. to be Honest i havent gone Through Database part ... as i dont got alot of time , havent finished learning C# but Am sure that my database wrapper is bad .. and impulse himself told me that using ORM Database is bad as well as Subsonic System .. NHibernate is the best Ever
shadowman123 is offline  
Reply


Similar Threads Similar Threads
Weird problem
05/02/2012 - CO2 Private Server - 2 Replies
Well i made Public class Called Lottery Then i add Made public Field of this Lottery Class like that publi class Lottery { public uint WonID; }
Weird Problem...
03/04/2012 - CO2 Private Server - 4 Replies
So long haha :D I developed some time ago a 5017 base, and on winxp it was working very well... I've changed my OS to win7 x64, the source runs normal, but when the client get the npcs spawned, the FPS go to 4/6 and the client get a hudge lag :X Would that be a problem with the client or WTF is that??????? :D ty in advance :P
KD-Bot Weird Problem Plz Help
01/22/2012 - SRO Private Server - 4 Replies
hello i am trying to use the KD-bot for Atomix server.. i got the loader to work but the KDBotLite.exe will not transfer/extract to the folder . if anyone knows how i can copy or extract the KDBotlite.exe part to the vsro folder please let me know
Weird problem
09/29/2011 - CO2 Private Server - 0 Replies
#Closed, Fixed :D.
a weird problem
03/23/2009 - Silkroad Online - 4 Replies
ok i have a cyber cafe... master pc: vga card: ati radeon xpress 1250 processor: amd athlon 64 x2 dual core processor 4000+ ram: 2 gb cyber pc's: vga card: ati radeon hd3200 processor: amd athlon 64 x2 dual core processor 5000+



All times are GMT +1. The time now is 06:17.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.