Type Expected, err in vb 2015. trying to define a mysql connection

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • samsy
    New Member
    • Sep 2015
    • 1

    #1

    Type Expected, err in vb 2015. trying to define a mysql connection

    Hello, I keep finding this err, on the line " Public conn As New MySqlConnection (constr)" stating that type expected and I cant seem to find the problem, please help.

    Code:
    Imports MySql.Data.MySqlClient
    Imports System.Runtime.InteropServices
    Imports System.Text
    Module Module1
        Public constr As String = "server=localhost;userid=root;password=;database=library"
        Public conn As New MySqlConnection(constr)
        Public com As New MySqlCommand
        Public adptr As MySqlDataAdapter
        Public fullname As String = ""
        Public usrid As Integer = 0
        Public username As String = ""
        Public usType As String = ""
        Public usLevel As Integer = 0
        Public callingBookFom As Integer = 0
        Public printchecker As Integer = 0
        Public ReadOnly a As Object
        Public Property ChFr As Integer
        Public Property NoCh As Integer
        Public Property ChTo As String
        Public Property RS1 As Object
    End Module
    Last edited by Rabbit; Sep 27 '15, 05:17 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
Working...