Hack Loader

Posts 1–6 of 6 · Page 1 of 1
Hack Loader
Hello I am currently looking for a way to make a loader for my hacks. I want to hook it up to my mysql database but I am not sure how to make one. Please help
regards - mcall
Language? What exactly are you intending to do. More specific please
Quote Originally Posted by mcall View Post
Hello I am currently looking for a way for someone to make me a loader for my hacks. I want to hook it up to my mysql database but I am not sure how to make one. Please help
regards - mcall
fixed.
.
I have a source for a loader in Delphi, but ... you want to connect to any database forum? exemples: Vbulletin or IPboards?...
Quote Originally Posted by Lacypro View Post
I have a source for a loader in Delphi, but ... you want to connect to any database forum? exemples: Vbulletin or IPboards?...
VB and IPB aren't databases. They are forum boards. A database is like MySQL, MySQLite, etc.
I have this tutorial in VB.net, if any ... use it!

 
VB.net tutorial
Let us begin ...

you will need to install a library called MySQL Connector. Net 5.2.5:
link: MySQL :: Download Connector/Net

First create a new project in the form and place the following controls:
- 1 Textbox (it will be written the query to be executed)
- A Datagridview (here is where the result will be displayed)
- 2 Buttons (1 to execute the query and another to test the connection to MySQL)

First of all, we declare Imports in the library upstairs, just to not have to keep writing "MySQL.Data.MySQLClient" all the time
thus:

Code:
Imports MySQL.Data.MySqlClient
This should be placed immediately before "Public Class Form1" should be the first thing written in your code window.

Well, now we declare a variable with the connection string, who does not know or remember the default connection to MySQL, here goes:

Code:
"Database=database name;Data Source=host;User Id=mpgh;Password=mpgh"
Declaring the variable, we have:

Code:
Dim connstr As String = "Database=database name;Data Source=host;User Id=mpgh;Password=mpgh"
This should be a global variable, declare it outside any function. I suggest that the states immediately below the "Public Class Form1".

As the connection is the same for both functions, we declare another global variable to it

Code:
Dim connection As New MySqlConnection(connStr)
Okay, now let's create a test function connection (actually a routine, not a function), call the TestConnection ()

Code:
 Sub TestConnection()
        Try
            connection.Open()
            connection.Close()
            MsgBox("Running connection")
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub
The above code is very simple, no? He tries to open and close the connection, if everything goes well, a message that appears all is well, otherwise it is a message containing the error.

Now in the button's onclick event to test connection type "TestConnection ()" and ready

In the OnClick event of the button to execute the query, type:

Code:
Private Sub btn_execute_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_execute.Click
        Dim query As String = txt_query.text
        Dim da As New MySqlDataAdapter(query, connection)
        Dim ds As New DataSet

        If da.Fill(ds) Then
            DataGridView1.DataSource = ds.Tables(0)
        End If

        connection.Close()
    End Sub
This code is also quite simple, it takes the query you wrote in "txt_query" and runs, then he fills the dataset called "ds" with the result and displays the result in "DataGridView1" and closes the connection

Ready! Our example program is finished.

Here's a sample query:

Code:
SELECT * FROM your_table
REMEMBERING: This tutorial is for VB.NET

Sorry for the English, there may be something wrong because I'm from Brazil and the translation may not be the same ...
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us