ERRO AO ABRIR PROGRAMA
Pessoal alguem sabe me dizer o que se refere o erro abaixo, quando tento abrir meu programa?
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.TypeLoadException: Could not load type [ô]ADODB.FieldsToInternalFieldsMarshaler[ô] from assembly [ô]CRecFiscal, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null[ô].
at System.StubHelpers.StubHelpers.CreateCustomMarshalerHelper(IntPtr pMD, Int32 paramToken, IntPtr hndManagedType)
at ADODB._Recordset.get_Fields()
at WindowsApplication1.FORM_LOGIN.OK_Click(Object sender, EventArgs e) in C:\Users\Leonardo Silveira\documents\visual studio 2010\Projects\CRecFiscal\CRecFiscal\Formularios\FORM_LOGIN.vb:line 15
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.TypeLoadException: Could not load type [ô]ADODB.FieldsToInternalFieldsMarshaler[ô] from assembly [ô]CRecFiscal, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null[ô].
at System.StubHelpers.StubHelpers.CreateCustomMarshalerHelper(IntPtr pMD, Int32 paramToken, IntPtr hndManagedType)
at ADODB._Recordset.get_Fields()
at WindowsApplication1.FORM_LOGIN.OK_Click(Object sender, EventArgs e) in C:\Users\Leonardo Silveira\documents\visual studio 2010\Projects\CRecFiscal\CRecFiscal\Formularios\FORM_LOGIN.vb:line 15
C:\Users\Leonardo Silveira\documents\visual studio 2010\Projects\CRecFiscal\CRecFiscal\Formularios\FORM_LOGIN.vb:line 15
da uma olhada no Form login na linha 15..
tu ta usando recordset ???
da uma olhada no Form login na linha 15..
tu ta usando recordset ???
Essa é parte do meu codigo do FORM_LOGIN, to axando que tem algo relacionado a minha conexao adodb, ou pode ser pelo fato de ter atualizado meu projeto para o framework 4.0, antes estava compilando no 3.5.
Public Class FORM_LOGIN
Dim Sql As String
Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
MMC_LOGIN.Enabled = False
Abrirconexao()
Sql = ([Ô]SELECT * FROM MMC_USUARIOS WHERE MMC_LOGIN = [ô][Ô] & MMC_LOGIN.Text & [Ô][ô][Ô])
[ô]Sql = [Ô]SELECT * FROM MMC_USUARIOS WHERE MMC_LOGIN = [ô][Ô] & MMC_LOGIN.Text & [Ô][ô] AND MMC_SENHA = [ô][Ô] & MMC_SENHA.Text & [Ô][ô][Ô]
tabela.Open(Sql, Conexao)
If tabela.EOF And tabela.BOF = True Then
MsgBox([Ô]Cadastro inexistente![Ô], vbCritical)
Else
lbllogin.Text = tabela.Fields([Ô]MMC_LOGIN[Ô]).Value
lblsenha.Text = tabela.Fields([Ô]MMC_SENHA[Ô]).Value
MMC_NIVEL.Text = tabela.Fields([Ô]MMC_NIVEL[Ô]).Value
Public Class FORM_LOGIN
Dim Sql As String
Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
MMC_LOGIN.Enabled = False
Abrirconexao()
Sql = ([Ô]SELECT * FROM MMC_USUARIOS WHERE MMC_LOGIN = [ô][Ô] & MMC_LOGIN.Text & [Ô][ô][Ô])
[ô]Sql = [Ô]SELECT * FROM MMC_USUARIOS WHERE MMC_LOGIN = [ô][Ô] & MMC_LOGIN.Text & [Ô][ô] AND MMC_SENHA = [ô][Ô] & MMC_SENHA.Text & [Ô][ô][Ô]
tabela.Open(Sql, Conexao)
If tabela.EOF And tabela.BOF = True Then
MsgBox([Ô]Cadastro inexistente![Ô], vbCritical)
Else
lbllogin.Text = tabela.Fields([Ô]MMC_LOGIN[Ô]).Value
lblsenha.Text = tabela.Fields([Ô]MMC_SENHA[Ô]).Value
MMC_NIVEL.Text = tabela.Fields([Ô]MMC_NIVEL[Ô]).Value
Estou usando sim recordset. veja como está sendo feito a conexao.
Module Conexao_Banco
Public Conexao As New ADODB.Connection
Public tabela As New ADODB.Recordset
Public Sub Abrirconexao()
Conexao = New ADODB.Connection
tabela = New ADODB.Recordset
Conexao.ConnectionString = [Ô]Provider=Microsoft.Jet.OLEDB.4.0;Data Source=[Ô] & Application.StartupPath & [Ô]\Cadastro.mdb;Jet OLEDB:Database Password=xxxxxx[Ô]
Conexao.Open()
End Sub
End Module
Module Conexao_Banco
Public Conexao As New ADODB.Connection
Public tabela As New ADODB.Recordset
Public Sub Abrirconexao()
Conexao = New ADODB.Connection
tabela = New ADODB.Recordset
Conexao.ConnectionString = [Ô]Provider=Microsoft.Jet.OLEDB.4.0;Data Source=[Ô] & Application.StartupPath & [Ô]\Cadastro.mdb;Jet OLEDB:Database Password=xxxxxx[Ô]
Conexao.Open()
End Sub
End Module
Será que este erro tem algo relacionado com a versao da referencia ADODB utilizada?
Tópico encerrado , respostas não são mais permitidas