Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Coding Releases > Coding Snippets
You last visited: Today at 07:44

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

Advertisement



.net MySQL/ MariaDB Class

Discussion on .net MySQL/ MariaDB Class within the Coding Snippets forum part of the Coding Releases category.

Reply
 
Old   #1
 
ecks de's Avatar
 
elite*gold: 0
The Black Market: 180/0/1
Join Date: Apr 2016
Posts: 1,452
Received Thanks: 202
Smile .net MySQL/ MariaDB Class

VB.NET:
C#:

You need this MySQL Connector:
ecks de is offline  
Thanks
1 User
Old 08/31/2017, 19:14   #2



 
Serraniel's Avatar
 
elite*gold: 2222
The Black Market: 204/1/0
Join Date: May 2010
Posts: 6,846
Received Thanks: 5,099
I just have checked the C# code but I assume the VB.Net may work the same. So here is some feedback about several issues I noticed by quickly scanning your code:

1: In sense to use this class as a MySQL wrapper you should be able to pass the connection data through the constructor and building the connection string dynamically instead of defining them during compile time and using the pre defined connection string.

2: Do not catch an exception and show a message box with the error in a class you may want to spread. In general, this type of error handling belongs to the developer who wants to use your lib.

3: Same for the query as for the constructor. Pass the query as parameter so it can be used for any query.

4: Instead of the closeConnection you should implement interface.
Serraniel is offline  
Old 08/31/2017, 23:33   #3
 
ecks de's Avatar
 
elite*gold: 0
The Black Market: 180/0/1
Join Date: Apr 2016
Posts: 1,452
Received Thanks: 202
Quote:
Originally Posted by Serraniel View Post
I just have checked the C# code but I assume the VB.Net may work the same. So here is some feedback about several issues I noticed by quickly scanning your code:

1: In sense to use this class as a MySQL wrapper you should be able to pass the connection data through the constructor and building the connection string dynamically instead of defining them during compile time and using the pre defined connection string.

2: Do not catch an exception and show a message box with the error in a class you may want to spread. In general, this type of error handling belongs to the developer who wants to use your lib.

3: Same for the query as for the constructor. Pass the query as parameter so it can be used for any query.

4: Instead of the closeConnection you should implement interface.
Ye thanks, that is actually an old version. handling exceptions and printing them is pretty bad i know, but it was for testing purporse only xd. thanks for feedback!
ecks de is offline  
Old 09/10/2017, 07:58   #4
 
atom0s's Avatar
 
elite*gold: 0
Join Date: May 2013
Posts: 175
Received Thanks: 122
This is fairly pointless/useless, to be honest. Your class does not offer any real useful features or expand off the already available features of the MySQL connector itself. There are several errors with your code as well, such as returning a value in a void function.
atom0s is offline  
Thanks
1 User
Reply

Tags
.net, database, mariadb, mysql


Similar Threads Similar Threads
Mysql funktioniert nicht.. service mysql status mysql does not exist in /etc/rc.d
07/09/2015 - Metin2 Private Server - 8 Replies
Hey, mein Mysql Server funktÝoniert von jetzt auf gleich nicht mehr.. Kam aus dem Freibad und alles war down.. Wenn ich den Mysql Server starten will sagt er mir: " service mysql status mysql does not exist in /etc/rc.d or the local startup directories (/usr/local/etc/rc.d) " Und wenn ich meinen Metin Server starte "cant connect to 127.0.0.1" weil der Mysql Server down ist..
[How To] Install CentOS 7 Server MariaDB
12/29/2014 - Last Chaos Private Server - 4 Replies
Viel Spa▀. https://www.youtube.com/watch?v=x2gQ8xDfeNs&f eature=youtu.be 1. yum update 2. yum install -y mysql mysql-server mysql-devel mysql-libs php-mysql httpd php gcc-c++ libstdc++.so.6 libz.so.1 libstdc++-libc6.2-2.so.3 libgssapi_krb5.so.2 screen lm_sensors lm_sensors-devel gtk+ php-devel 3. yum install httpd 4. systemctl start httpd.service 5. systemctl enable httpd.service
Security vulnerability in MySQL/MariaDB sql/password.c
06/15/2012 - Metin2 PServer Guides & Strategies - 10 Replies
Something very important for all that article is not mine i am just sharing information "Hi We have recently found a serious security bug in MariaDB and MySQL. So, here, we'd like to let you know about what the issue and its impact is. At the end you can find a patch, in case you need to patch an older unsuported MySQL version.
setup Net microsoft net Framework sp 3.5 sp1 log all setup Net microsoft net Framewo
11/17/2011 - Rappelz - 0 Replies
setup Net microsoft net Framework sp 3.5 sp1 log all setup Net microsoft net Framework sp 3.5 sp1 log all some proplem this ): here ........ http://www.elitepvpers.com/forum/rappelz/1542117- help-decrypt-client-3.html#post13918381 help @@ PLZ ):



All times are GMT +1. The time now is 07:44.


Powered by vBulletin®
Copyright ©2000 - 2023, 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 ©2023 elitepvpers All Rights Reserved.