|
You last visited: Today at 05:32
Advertisement
[Question]Is it possbile to make 5165 load accs, ranks, characters From mysql ?
Discussion on [Question]Is it possbile to make 5165 load accs, ranks, characters From mysql ? within the CO2 Private Server forum part of the Conquer Online 2 category.
03/12/2010, 23:37
|
#16
|
elite*gold: 0
Join Date: Feb 2010
Posts: 492
Received Thanks: 222
|
Thanks .Arco
+Thanks
|
|
|
03/12/2010, 23:59
|
#17
|
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,161
|
First of all you need to implement the MySql.Data.dll into the project (Add refference).
Then you need to set up an connection, don't know if you have a Database.cs, but somewhere where the data base is handled, do a new connection string.
You do this by using
Quote:
MySqlConnection connection;
|
You may need to make this public/static.
Then, you need a Connect function. Basically, this is just used to create a new MySqlConnection with the correct host,user and database (check other SQL sources for examples, this vary on your DB). Don't forget to open the connection.
Now, people suggested you to use the LOTF way, well don't.
Here's an example how another way works:
Quote:
MySqlCommand cmd = new MySqlCommand("SELECT * FROM `accounts`", connection) // Get all data from the accounts table
MySqlDataReader rdr = cmd.ExecuteReader();
while (rdr.Read()) // While it keeps reading
{
Console.WriteLine(rdr["Name"]); // Output the variablename value "Name" in the console
}
rdr.Close(); //Closes the reader
|
Good luck!
|
|
|
03/13/2010, 00:29
|
#18
|
elite*gold: 0
Join Date: Feb 2010
Posts: 492
Received Thanks: 222
|
Thanks, but :S
|
|
|
03/13/2010, 00:37
|
#19
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
|
Just do a search on the net for MySQL in C#, i wouldnt bother listening to emme if i were you, hes not great at programming, and fails even more at explaining things.
|
|
|
03/13/2010, 00:39
|
#20
|
elite*gold: 0
Join Date: Dec 2007
Posts: 378
Received Thanks: 163
|
I converted EVERYTHING into MySQL in my source, without using anything as a guide.
@Paralyzer, Knowing you level of C# knowledge, just give up, it's way too advanced for you.(If you did it the way I did, however)
|
|
|
03/13/2010, 00:41
|
#21
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
|
Quote:
Originally Posted by walmartboi
I converted EVERYTHING into MySQL in my source, without using anything as a guide.
@Paralyzer, Knowing you level of C# knowledge, just give up, it's way too advanced for you.(If you did it the way I did, however)
|
Im interested in what you did which you would class as advanced?
|
|
|
03/13/2010, 00:48
|
#22
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
|
Quote:
Originally Posted by Korvacs
Im interested in what you did which you would class as advanced?
|
Too advanced for HIM.(Paralyzer)
Not advanced in general.
|
|
|
03/13/2010, 01:00
|
#23
|
elite*gold: 0
Join Date: Feb 2010
Posts: 492
Received Thanks: 222
|
Well I can code things, atm im conveting CTF to 5165 and just mysql converting is not my thing
|
|
|
03/13/2010, 01:25
|
#24
|
elite*gold: 0
Join Date: Mar 2010
Posts: 133
Received Thanks: 22
|
Quote:
Originally Posted by EmmeTheCoder
First of all you need to implement the MySql.Data.dll into the project (Add refference).
Then you need to set up an connection, don't know if you have a Database.cs, but somewhere where the data base is handled, do a new connection string.
You do this by using
You may need to make this public/static.
Then, you need a Connect function. Basically, this is just used to create a new MySqlConnection with the correct host,user and database (check other SQL sources for examples, this vary on your DB). Don't forget to open the connection.
Now, people suggested you to use the LOTF way, well don't.
Here's an example how another way works:
Good luck!
|
stop giving him answers i told him what to do search on google for a mysql dll and try to do it himself!
Your just going to spoonfeed him? stop it. its stupid. emil you wont ever learn will you?
|
|
|
03/13/2010, 01:25
|
#25
|
elite*gold: 0
Join Date: Mar 2010
Posts: 133
Received Thanks: 22
|
dont convert it to 5165 make ur own
|
|
|
03/13/2010, 02:29
|
#26
|
elite*gold: 0
Join Date: Feb 2010
Posts: 90
Received Thanks: 17
|
Quote:
Originally Posted by Paralyzer[GM]
Well I have been wondering this for a long but but I relise you need another .cs file I dono call it Connect.cs and ur gonna want the tables Characters, Accounts, Top archer, Top ko, Top Donations etc
But how would you do this ? change the method from biniary to save ? idk just asking for some help with this and I may try to do this.
|
I think the mysql work far more efficient than Binary Read / Write!
I thought changes 5165source working on MYSQL..
But so much code need modify ...
I try to modify some code, but there So much errors, the result, I lost the information on the 5165source!
I'm chinese , I hope that interested people and I get together, you must C # Professional!!
|
|
|
03/13/2010, 11:40
|
#27
|
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,161
|
Quote:
Originally Posted by Korvacs
Just do a search on the net for MySQL in C#, i wouldnt bother listening to emme if i were you, hes not great at programming, and fails even more at explaining things.
|
"Okay". I'm not even going to bring the discussing to the table, but yeah none of you seen me code for over a year, and the way I showed on page 2 is a really good way to do it.
Btw, don't moderators support people helping?
@herekorvac
I'm not spoonfeeding him, that's helping, explaining to him every row in a good way to do MySQL queries, it's not like I'm giving him a copy-paste code.
peace
|
|
|
03/13/2010, 11:59
|
#28
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
|
Quote:
Originally Posted by EmmeTheCoder
"Okay". I'm not even going to bring the discussing to the table, but yeah none of you seen me code for over a year, and the way I showed on page 2 is a really good way to do it.
Btw, don't moderators support people helping?
@herekorvac
I'm not spoonfeeding him, that's helping, explaining to him every row in a good way to do MySQL queries, it's not like I'm giving him a copy-paste code.
peace
|
Yeah we support people helping, not hindering, which what you tend to do.
SQL is something that changes from source to source and from use to use, youve demonstrated a bad way of doing 1 aspect of SQL, what happens if the connection is already active, or in use, or limited to 1 user, or it times out. You havent handled any of these.
You arnt using stored procedures either, so its going to be alot slower than it could be.
You are happy doing what your doing, no need for you to come back here emme.
|
|
|
03/13/2010, 12:01
|
#29
|
elite*gold: 0
Join Date: Mar 2010
Posts: 133
Received Thanks: 22
|
Quote:
Originally Posted by Korvacs
Yeah we support people helping, not hindering, which what you tend to do.
SQL is something that changes from source to source and from use to use, youve demonstrated a bad way of doing 1 aspect of SQL, what happens if the connection is already active, or in use, or limited to 1 user, or it times out. You havent handled any of these.
You arnt using stored procedures either, so its going to be alot slower than it could be.
You are happy doing what your doing, no need for you to come back here emme.
|
korvacs luves me,
|
|
|
03/13/2010, 13:02
|
#30
|
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 793
|
Quote:
Originally Posted by Paralyzer[GM]
Well I can code things, atm im conveting CTF to 5165 and just mysql converting is not my thing
|
You should check the difference between coding and scripting. You`re not coding, you`re scripting. I think this helps, if not, then sorry.
|
|
|
|
|
Similar Threads
|
[Question] Special Characters in 5165
08/27/2010 - CO2 Private Server - 2 Replies
Good morning community :)
Like everyone knows it's not possible to make a char with special Characters ( Like †, £, Ð and so on ).. That's poor :(
Well. Did anyone fixed this yet, or is it possible to do this at All ?
|
[QUESTION] How can you make 5165 Navicat/MySql
02/27/2010 - CO2 Private Server - 3 Replies
What the title sais
How can you make a Flatfile based source ( 5165 ) into a Database on Navicat/MySql
Help would be nice !
|
question about skill ranks and class ranks
01/10/2010 - Cabal Online - 0 Replies
take look. my sword rank is apprentice and i have 40/41 skill points and i cant get to next rank, it requires class rank 4. is there any way to get next sword rank without getting required class rank ?
|
[Question] Mysql 5165
01/03/2010 - CO2 Private Server - 6 Replies
Is possivel put mysql in source 5165? is it is how i can do that?
|
[QUESTION] Make this load in ini
05/25/2009 - CO2 Private Server - 9 Replies
Well im trying to make my Portals load ini from my debug can someoen help me with this?
public static void LoadPortals()
{
MySqlCommand Command = new MySqlCommand("SELECT * FROM `portals`;", Connection);
MySqlDataAdapter Adapter = new MySqlDataAdapter(Command);
DataSet DS = new DataSet("Count");
Adapter.Fill(DS, "Count");
if (DS.Tables.Rows.Count > 0)
|
All times are GMT +2. The time now is 05:32.
|
|