MarksASP
MarksASP

Reputation: 506

How can I display MySQL output in Visual Basic?

By output I mean for example:

ACTION                                     MESSAGE
INSERT INTO table1 VALUES(value1,value2)   1 row(s) affected

I only want the output on the MESSAGE column, how can I access to MySQL output using Visual Basic?

Upvotes: 2

Views: 88

Answers (1)

TiagoT
TiagoT

Reputation: 51

You can get the number of rows affected like this.

Dim numberRowsAffected As Integer
Dim sqlCommand As New MySqlCommand
Try
    'Code
    numberRowsAffected = sqlCommand.ExecuteNonQuery()
Catch ex As Exception

End Try

For more info how to use MySqlCommand object:

https://dev.mysql.com/doc/connector-net/en/connector-net-tutorials-sql-command.html

Upvotes: 1

Related Questions