|
-
Sep 14th, 2025, 11:56 AM
#1
Thread Starter
Junior Member
[RESOLVED] VB.NET Ambiguous error in VS 2022
I am trying to load a large collection of data lines to a MYSQL database. The database is created and is local and is visible in MYSQL workbench. I have installed MySQL Connector and mySQL is visible in the solution explorer . I am getting a ambiguity error, and 2 others - see below.
I have followed (I think) the MS instructions with this code :
Public Sub Init()
Dim MySqlClient As String = "MySQL84"
Dim mySQLConnectionString As String
mySQLConnectionString = "server=127.0.0.1:3306;" & "uid=root;" & "pwd=1212Tyke!;" & "database=pooldata;"
Dim conn As New MySql.Data.MySqlClient.MySqlConnection(mySQLConnectionString)
conn.ConnectionString = mySQLConnectionString
Try
conn.open()
MsgBox("Connected to database")
Catch ex As Exception 'errorString 'MySql.Data.MySqlClient.MySqlException
End Try
End Sub
I get the following 3 errors
'Data' is ambiguous in the namespace 'ConsolidatedPoolData.MySql'.
'connectionstring' is not a member of 'MySqlConnection'.
'open' is not a member of 'MySqlConnection'.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|