Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I read a link from mysql databse???
#7
i have n0w pr0vided this c0de in the updater f0rm:
Code:
Imports MySql.Data.MySqlClient
Public Class updater
    Public conn As MySqlConnection

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        conn = New MySqlConnection(ServerString)
        Try
            conn.Open()
            Dim sqlquery As String = "SELECT vlink, dlink, ftpu, dtpp FROM updater"
            Dim data As MySqlDataReader
            Dim adapter As New MySqlDataAdapter
            Dim command As New MySqlCommand
            command.CommandText = sqlquery
            command.Connection = conn
            adapter.SelectCommand = command
            data = command.ExecuteReader
            Dim vlink As String = ""
            Dim dlink As String = ""
            Dim ftpu As String = ""
            Dim dtpp As String = ""
            While data.Read()
                If data.HasRows() Then
                    vlink = data(1).ToString
                    dlink = data(2).ToString
                    ftpu = data(3).ToString
                    dtpp = data(4).ToString
                End If
            End While
            UpdateVB1.checkforupdate(vlink, "0.0.9", dlink, ftpu, dtpp, True)
            data.Close()
            conn.Close()
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
    End Sub
End Class

but it is saying an error in the msgbox....
The snapshot of the error and my sql database snapshot is given below:

Error:
[Image: 10zp7w2.png]

Database:
[Image: 21ootpw.png]


Please help me why this problem occurs.....


Messages In This Thread
Re: How can I read a link from mysql databse??? - by mnxford - 03-26-2013, 11:46 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How do I use Listview to delete MySQL DB records kismetgerald 10 33,855 11-28-2012, 05:19 PM
Last Post: brandonio21
  [SOLVED] MySQL Update Query - What am I doing wrong? kismetgerald 11 43,310 10-18-2012, 07:16 PM
Last Post: brandonio21
  How do I fill my form with MySQL data based on Combobox? kismetgerald 8 26,704 10-14-2012, 09:05 PM
Last Post: brandonio21
  Read certain lines brco900033 3 14,632 09-26-2012, 03:56 PM
Last Post: brandonio21
  Read and delete lines brco900033 6 22,568 09-16-2012, 09:38 AM
Last Post: brandonio21
  Help with creating an INSERT statement using MySQL kismetgerald 4 16,756 08-30-2012, 03:03 PM
Last Post: brandonio21
  MySQL Database Issue Moldraxian 7 29,051 08-13-2012, 08:58 PM
Last Post: brandonio21
  MySql Database Queries in VB.Net Moldraxian 6 22,379 07-26-2012, 03:44 PM
Last Post: Moldraxian
  How to Package MySql Connector and MySql Program? Moldraxian 3 14,754 07-20-2012, 12:23 PM
Last Post: brandonio21
  MySql Help Blackrobot 3 14,619 04-06-2012, 03:49 AM
Last Post: xolara

Forum Jump:


Users browsing this thread: 1 Guest(s)