An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in Microsoft.VisualBasic.dll
[Microsoft][ODBC Driver Manager] Nome da fonte de dados não encontrado e nenhum driver padrão especificado
In my code I'm importing ADODB. And I am making the connection as follows:
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
ODB = "Provider=MSDASQL.1;Persist Security Info=False;Extended Properties='DSN=fundacao;DESCRIPTION=fundacao;SERVER=localhost;UID=root;password=11111111;DATABASE=fundacao;PORT=3306'"
End Sub
And you're giving this part error:
Sub busca_SQL(SQL)
cox = New ADODB.Connection
cox.Open(ODB)
RX = New ADODB.Recordset
' MsgBox(SQL)
' Debug.Print SQL
RX.Open(SQL, cox, , LockTypeEnum.adLockOptimistic, -1) 'aqui coloca-se uma "SQL"
End Sub
My project is a windows application.