By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,982 Members | 1,738 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,982 IT Pros & Developers. It's quick & easy.

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

P: 1
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.

Expand|Select|Wrap|Line Numbers
  1. Imports MySql.Data.MySqlClient
  2. Imports System.Runtime.InteropServices
  3. Imports System.Text
  4. Module Module1
  5.     Public constr As String = "server=localhost;userid=root;password=;database=library"
  6.     Public conn As New MySqlConnection(constr)
  7.     Public com As New MySqlCommand
  8.     Public adptr As MySqlDataAdapter
  9.     Public fullname As String = ""
  10.     Public usrid As Integer = 0
  11.     Public username As String = ""
  12.     Public usType As String = ""
  13.     Public usLevel As Integer = 0
  14.     Public callingBookFom As Integer = 0
  15.     Public printchecker As Integer = 0
  16.     Public ReadOnly a As Object
  17.     Public Property ChFr As Integer
  18.     Public Property NoCh As Integer
  19.     Public Property ChTo As String
  20.     Public Property RS1 As Object
  21. End Module
Sep 27 '15 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.