![]() |
|
AccessViolationException was unhandled error - نسخة قابلة للطباعة +- منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب (http://vb4arb.com/vb) +-- قسم : قسم لغة الفيجوال بيسك VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=182) +--- قسم : قسم اسئلة VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=183) +--- الموضوع : AccessViolationException was unhandled error (/showthread.php?tid=6843) الصفحات:
1
2
|
AccessViolationException was unhandled error - hoob computer - 04-11-12 ,Hi everyone
:I'm facing an issue in my project every time that I'm trying to use "openfiledialog", and you can see the issue below [ATTACH=CONFIG]1218[/ATTACH] :And I have the following .I had "Login Form", and I deleted it .Changed the startup form to the MDIParent !Debug the project and it's worked just fine :The "Login Form" is [ATTACH=CONFIG]1219[/ATTACH] :And the code of the "Login Form" is كود : Imports System.Data.OleDb:I searched all the code, and I did the following كود : Private Sub LoginFrm_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
!If you noticed that I canceled the calling of the function "UsersCount()" and everything works fine
.I don't know what is the problem in that function ?Do you have any suggestion for me .I'll appreciate it .Best AccessViolationException was unhandled error - amgadtamer - 04-11-12 try change your code to PHP كود : if openfiledialog.showdialog=dialogresulut.ok thenare you trying to get count of recods inside the table ? PHP كود : Function UsersCount()best regards AccessViolationException was unhandled error - hoob computer - 05-11-12 ,Hi bro
.Thanks for replying me :The following code is about a query in the Dataset that counts the users in the Users_Table ()Function UsersCount get the password from the database Dim DA As New ERPDataSetTableAdapters.User_Tbl_localTableAdapter Dim TB = DA.User_Count If TB = 0 Then Return True Else Return False End If End Function The problem is not in the (OpenFileDialog), it is in calling of these two (Functions -UsersCount- and -UserLoggedIn-) as I think but I'm not sure. And the Function UserLoggedIn is to check if the user entered the correct username and password that were stored in the Users_Table. I hope you got all the information that could help you to understand my issue. I'll appreciate your help. Best. AccessViolationException was unhandled error - عبدالله الدوسري - 05-11-12 ,Hi hoob computer "Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt” : This issue shouldn't happen in managed code You can try setting Visual Studio Debugger to bypass this exception "Tools menu ->Options -> Debugging -> General -> Uncheck this option "Suppress JIT optimization on module load I hope this will be helpful to your issue. Best regards, AccessViolationException was unhandled error - hoob computer - 05-11-12 .Hi Abdullah, Thanks for your reply
.I did what you said, but the issue still appears ?I think that issue is happening because I'm calling two queries from one table (Users_Table) and one TableAdapter, don't you think that ?So, what is the solution for that issue AccessViolationException was unhandled error - amgadtamer - 05-11-12 check the attached file it may help you to solve your issue AccessViolationException was unhandled error - hoob computer - 05-11-12 .Hi amgadtamer, thanks for your reply
:I used the following code PHP كود : Dim da As New ERPDataSetTableAdapters.User_Tbl_localTableAdapter?what should I do AccessViolationException was unhandled error - hoob computer - 05-11-12 . I attached the project to let you see the issue
.when I click on Open File or on the Done (Button1) in the AfterLogin.Frm form, I got the issue too ?So, what do you suggest AccessViolationException was unhandled error - amgadtamer - 05-11-12 your project run on my pc without any errors :confused: AccessViolationException was unhandled error - hoob computer - 05-11-12 ?Really
?Why isn't it run on my computer without errors ?Did you try to run the OpenFileDialog .Before I called the UserLoggedIn, it was working fine .I tried to remove that function and create another one, but nothing happened and the issue still appears .I've even created a new project and put everything in it, but the same issue appeared again .I have another projects, they run fine on my computer ?So, what do you suggest to me |