I still looking for the answer, while I'm still trying this Visual Studio to develop some web app using VB.net language...
hmmm.... I actually wanted to printout my catch message, but somehow, if I put this one...
Try
Dim oCommand As MySqlCommand = New MySqlCommand("SELECT * FROM suppliermst WHERE supplierid = " & p_iSupplierId, oConnection)
oConnection.Open()
oReader = oCommand.ExecuteReader
While oReader.Read
oSuppliermst = New suppliermst
oSuppliermst.supplierId = oReader("supplierid")
oSuppliermst.name = oReader("name")
oSuppliermst.state = oReader("state")
oSuppliermst.telNo = oReader("telno")
oSuppliermst.mobileNo = oReader("mobileno")
oSuppliermst.faxNo = oReader("faxno")
oSuppliermst.email = oReader("email")
oSuppliermst.countryCode = oReader("countrycode")
oSuppliermst.companyName = oReader("companyname")
oSuppliermst.city = oReader("city")
oSuppliermst.address1 = oReader("address1")
oSuppliermst.address2 = oReader("address2")
oSuppliermst.postCode = oReader("postcode")
End While
Catch ex As Exception
'log here
Console.WriteLine("error on getSuppliermstBySupplierId() function" & ex.Message)
Finally
closeMySqlDataReader(oReader)
closeMySqlConnection(oConnection)
End Try
The Catch doesn't give me anything at all... How to printout the catching in VB.net?