0

The problem I have with the knowledge that everything was in working time without a problem

An unhandled exception of type 'System.InvalidOperationException' occurred in myprogram.exe

Additional information: An error occurred creating the form. See Exception.InnerException for details. The error is: Could not load file or assembly 'System.Data.dll' or one of its dependencies. is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)

Imports System.Management

Imports MySql.Data.MySqlClient
Imports AutoUpdaterDotNET
Imports System.Net
Imports System.Text.RegularExpressions
Imports System.Threading

Public Function jokenconn() As MySqlConnection
    Return New MySqlConnection("server=localhost;user id=exeportal;password=00000;database=00000")
End Function

I think the problem here

 Dim cmd As New MySqlCommand
            Dim da As New MySqlDataAdapter
            Dim con As MySqlConnection = jokenconn()

            sql = String.Format("SELECT * FROM `users` WHERE username= '{0}' and status= '{1}'", TextBox1.Text, 1)
                .Connection = con
                .CommandText = sql
            End With
            da.SelectCommand = cmd
            da.Fill(publictable)
            If publictable.Rows.Count > 0 Then
                Dim user_type, name As String
                If user_type = "" Then
                ElseIf user_type = "Encoder" Then
                Else
                    'welcome
                End If

            Else
                MsgBox("error")
                End

            End If
            da.Dispose()
            con.Clone()
  • I've not encountered this but [This may be helpful](https://msdn.microsoft.com/en-us/library/e74a18c4(v=vs.110).aspx), the binding log viewer which you can access by typing `fuslogvw` on the Visual Studio Command Prompt – Jimmy Smith Aug 04 '16 at 19:31
  • You said this was working and now it is not. Did you move the project or make any changes in project settings? – Jimmy Smith Aug 04 '16 at 19:32
  • Thanks @JimmySmith No action has not been any change any of the settings As for the application is programmed by VisualStudio 2012 - Windows 10 - .Net FrameWork 4.5 | Compile --> Release Active x86 What application and project works but when examining databases Comes to me Additional information: Could not load file or assembly 'System.Data.dll' or one of its dependencies. is not a valid Win32 application. (Exception from HRESULT: 0x800700C1) – Mohamed Ahmed Aug 04 '16 at 19:43
  • @JimmySmith When you remove the existing lines in the Post of the problem The program works without a problem – Mohamed Ahmed Aug 04 '16 at 19:45
  • I would take a look at the log as I don't think your code is the issue here. [here's an issue like yours](http://stackoverflow.com/questions/20211526/could-not-load-file-or-assembly-system-data-error-when-deploying-application-on) – Jimmy Smith Aug 04 '16 at 19:47
  • Thank You Mr Thank you very much, dear Professor @JimmySmith :( I have access to many of the details but the result is learning more But the only solution to solve the problem for me is to re-install Windows 10 system After many testing before it learned that the system refreshes the day before, but exactly what the update was causing so I do not know exactly, but after so much on programs Thank you very much – Mohamed Ahmed Aug 06 '16 at 00:03

0 Answers0