Register for your free account! | Forgot your password?

You last visited: Today at 22:57

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

 

[Release] Fastest MySql System [C#]

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2011
Posts: 470
Received Thanks: 96
[Release] Fastest MySql System [C#]

Removed.

Why do you think?
Is it really THAT shocking to you that I removed it?



Spirited42 is offline  
Thanks
3 Users
Old   #2
 
elite*gold: 0
Join Date: Dec 2009
Posts: 583
Received Thanks: 118
=O Good job gareth


.Ryu is offline  
Old   #3
 
elite*gold: 0
Join Date: Jan 2011
Posts: 470
Received Thanks: 96
#Updated.
I included my MySql Reader too.
This is my full mysql system.

#request thread name change to:
"[Release] Fastest MySql System [C#]"

Thanks. =]
Sincerely,
Spirited.
Spirited42 is offline  
Old   #4
 
elite*gold: 106
Join Date: Oct 2006
Posts: 6,045
Received Thanks: 1,160
Done.


Huseby is offline  
Thanks
1 User
Old   #5
 
elite*gold: 0
Join Date: Jan 2011
Posts: 470
Received Thanks: 96
Nobody has anything to say about this? .-.
Can I improve on anything in this?
Spirited42 is offline  
Old   #6
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,227
Received Thanks: 2,476
Eh, this isnt really that fastest method to query mysql nowadays, you need to be using stored procedures really.
Korvacs is offline  
Thanks
1 User
Old   #7
 
elite*gold: 0
Join Date: Dec 2009
Posts: 583
Received Thanks: 118
Quote:
Originally Posted by Korvacs View Post
Eh, this isnt really that fastest method to query mysql nowadays, you need to be using stored procedures really.
Your such a downer huh? You can't just say thanks and be on with it lol
.Ryu is offline  
Thanks
2 Users
Old   #8
 
elite*gold: 0
Join Date: Sep 2007
Posts: 565
Received Thanks: 98
Quote:
Originally Posted by .Ryu View Post
Your such a downer huh? You can't just say thanks and be on with it lol
Its called constructive criticism. If you cannot take it then your choosing the wrong "hobby" or profession. Nobody gets better if nobody tells them its wrong.
StarBucks is offline  
Thanks
1 User
Old   #9
 
elite*gold: 0
Join Date: Jan 2011
Posts: 470
Received Thanks: 96
Quote:
Originally Posted by StarBucks View Post
Its called constructive criticism. If you cannot take it then your choosing the wrong "hobby" or profession. Nobody gets better if nobody tells them its wrong.
You're right. That's actually what I was looking for actually by releasing this. I really do need advice with coding. Well, hope you guys use it well. I'm going to look up what stored procedures are.

EDIT: Wooaahhh... that's really different. .-. I've never seen anything like that. It seems powerful but very challenging... hmm... maybe I should look at other sites besides Wikipedia.
Spirited42 is offline  
Old   #10
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,227
Received Thanks: 2,476
Quote:
Originally Posted by .Ryu View Post
Your such a downer huh? You can't just say thanks and be on with it lol
Well, the rest of it is good, just that the string based query isnt as fast as a stored procedure which moves alot of the work you may want to do with the data onto the mysql server and returns a more precise data set, or allows you to do less handling of data on the game server and more on the mysql server.

They are faster and more powerful than string based queries, but your right i should just keep these sort of improvements to myself and let you guys, the community, flounder around using out dated methods...
Korvacs is offline  
Thanks
2 Users
Old   #11
 
elite*gold: 0
Join Date: Dec 2009
Posts: 583
Received Thanks: 118
Quote:
Originally Posted by Korvacs View Post
Well, the rest of it is good, just that the string based query isnt as fast as a stored procedure which moves alot of the work you may want to do with the data onto the mysql server and returns a more precise data set, or allows you to do less handling of data on the game server and more on the mysql server.

They are faster and more powerful than string based queries, but your right i should just keep these sort of improvements to myself and let you guys, the community, flounder around using out dated methods...
Is this the stored procedure you might be talking about?
I'm looking into and came across this

Code:
using System;

using System.Collections.Generic;

using System.Data;

using MySql.Data.MySqlClient;

using System.Configuration;

using System.ComponentModel;

 

[DataObject(true)]

public static class MessagesDB

{

    private static string GetConnectionString()

    {

        return ConfigurationManager.ConnectionStrings

            ["MySQLConnectionString"].ConnectionString;

    }

 

    [DataObjectMethod(DataObjectMethodType.Select)]

    public static List<MessageItem> GetMessages()

    {

        MySqlCommand cmd = new MySqlCommand("ShowAll", new MySqlConnection(GetConnectionString()));

        cmd.CommandType = CommandType.StoredProcedure;

        cmd.Connection.Open();

        MySqlDataReader dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);

 

        List<MessageItem> MessageItemlist = new List<MessageItem>();

        while (dr.Read())

        {

            MessageItem MessageItem = new MessageItem();

            MessageItem.Entry_ID = Convert.ToInt32(dr["Entry_ID"]);

            MessageItem.Message = Convert.ToString(dr["Message"]);

            MessageItem.Name = Convert.ToString(dr["Name"]);

            MessageItem.Email = Convert.ToString(dr["Email"]);

            MessageItemlist.Add(MessageItem);

        }

        dr.Close();

        return MessageItemlist;

    }

 

    [DataObjectMethod(DataObjectMethodType.Insert)]

    public static void InsertMessage(MessageItem MessageItem)

    {

        MySqlCommand cmd = new MySqlCommand("InsertMessage", new MySqlConnection(GetConnectionString()));

        cmd.CommandType = CommandType.StoredProcedure;

        cmd.Parameters.Add(new MySqlParameter("param1", MessageItem.Name));

        cmd.Parameters.Add(new MySqlParameter("param2", MessageItem.Email));

        cmd.Parameters.Add(new MySqlParameter("param3", MessageItem.Message));

        cmd.Connection.Open();

        cmd.ExecuteNonQuery();

        cmd.Connection.Close();

    }

 

    [DataObjectMethod(DataObjectMethodType.Update)]

    public static int UpdateMessage(MessageItem MessageItem)

    {

        MySqlCommand cmd = new MySqlCommand("UpdateMessage", new MySqlConnection(GetConnectionString()));

        cmd.CommandType = CommandType.StoredProcedure;

        cmd.Parameters.Add(new MySqlParameter("paramkey", MessageItem.Entry_ID));

        cmd.Parameters.Add(new MySqlParameter("param1", MessageItem.Name));

        cmd.Parameters.Add(new MySqlParameter("param2", MessageItem.Email));

        cmd.Parameters.Add(new MySqlParameter("param3", MessageItem.Message));

        cmd.Connection.Open();

        int i = cmd.ExecuteNonQuery();

        cmd.Connection.Close();

        return i;

    }

 

    [DataObjectMethod(DataObjectMethodType.Delete)]

    public static int DeleteMessage(MessageItem MessageItem)

    {

        MySqlCommand cmd = new MySqlCommand("DeleteMessage", new MySqlConnection(GetConnectionString()));

        cmd.CommandType = CommandType.StoredProcedure;

        cmd.Parameters.Add(new MySqlParameter("param1", MessageItem.Entry_ID));

        cmd.Connection.Open();

        int i = cmd.ExecuteNonQuery();

        cmd.Connection.Close();

        return i;

    }

 

}
I would just post the link but i'm not quite sure it's allowed.

#Edit
Well...here is something else i found



Or even this



Is this what your talking about i'm not sure i quite get it yet
.Ryu is offline  
Old   #12
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,227
Received Thanks: 2,476


Yes those are examples of using stored procedures, one of the important parts is that you only need send the variables to the server instead of the entire string, and then the mysql server does all of the rest of the work, you obviously need to write the rest of the handling on the mysql server.

My fusionorigins source and cuosp source both use stored procedures.
Korvacs is offline  
Thanks
2 Users
Old   #13
 
elite*gold: 0
Join Date: Dec 2009
Posts: 583
Received Thanks: 118
Quote:
Originally Posted by Korvacs View Post


Yes those are examples of using stored procedures, one of the important parts is that you only need send the variables to the server instead of the entire string, and then the mysql server does all of the rest of the work, you obviously need to write the rest of the handling on the mysql server.

My fusionorigins source and cuosp source both use stored procedures.
Oh i see =O i will download your source to check it out then thanks
.Ryu is offline  
Old   #14
 
elite*gold: 0
Join Date: Feb 2010
Posts: 89
Received Thanks: 19
Unlike you do for me I'll say. Good job, atleast your learning and not leaching. Even if things aren't the BEST. YOU can't be the best without practice. Good job.
5supertao is offline  
Thanks
1 User
Old   #15
 
elite*gold: 0
Join Date: Feb 2008
Posts: 316
Received Thanks: 114
Thanks, hopefully this might make a difference in my SQL handler and my SQL problems could dissapear, well a step
thx


drakejoe67 is offline  
Reply



« Previous Thread | Next Thread »

Similar Threads
Mysql Login System erstellen
Hallo zusammen =) ich mal wieder xD da mein anderes problem mit dem Kontaktformular noch in Arbeit ist, komme ich schon einmal zu meinem...
9 Replies - Web Development
Vote System zeigt MySQL Error
Hey, für unseren 2.4.3 Armemu Server wollten wir ein VOte System einbauen.. Klappte alles wunderbar aber es kommt wenn man auf "Vote now" klickt ein...
1 Replies - WoW Private Server
[Release] MySQL Insert system
Ello! First of all, this is NOT sourcedependent, which means you can use this on any source without modifying the code. This is an replacement...
18 Replies - CO2 PServer Guides & Releases
[Help CoEmuV2 (PHP/MYSQL required)] Donation system
I want an system if someone donated it updates an other column so: Confirmation Code : put something here // Mysql table: Dragonballs.Dcode...
2 Replies - CO2 PServer - Discussions / Questions



All times are GMT +1. The time now is 22:57.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2017 elitepvpers All Rights Reserved.