operation must use an updateable query in vb.net using myapp.exe - vb.net

I am a newbie and not also good in explaning but i will try my best I hope you understand so here it is. Im trying to create application.exe with ms access database at first it works login and searching but when i try to edit or enter another data using my application.exe this happen operation must use an updateable query but when im not using .exe app no problem show
This is the step by step That i do when executing my app. why did i include this maybe, I don't know and I'm not really sure that the cause of the problem is the way of my executing the application. By the way this is my connection string that I use
Public cn As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\DB_HR.accdb;Jet OLEDB:DATABASE PASSWORD=dbhr123;")
Step 1. I put my database the bin/debug
Then
Step 2. I add my data base Solution Explorer
Step 3.I go to the properties of my DB_HR.accdb by right cliking and change the Copy to output Directory to Copy if newer like this
Step 4. I build the windows app just like i do in this picture
Step 5.I change my app.manifest code requestedExecutionLevel level="asInvoker" uiAccess="false" into highestAvailable just like this
Step 6. I use Setup Wizad to create my executable application. and I add this Files and then I created a
shorcut for my WindowsApp1.exe just like i do in this picture then drag it into user's Desktop Then in the Build menu I click the batch build to create the .exe app
But the problem is still The same operation must use an updateable query
Can you help me please.What should I Do? Thanks in advance

I Found a solution. Try to check your App.config Solution Explorer and Open it.
If the code look like this then You should Add this code then save it.
Then try to execute your program.

Related

Delete VBA module

I was deleting an Access Object (a report) and Access crashed during the delete.
The object no longer exists in Access, but its module still shows up in VBA like a ghost.
If I click on it, I get a FILE NOT FOUND error.
If I try to compact & repair or compile the database, I get a FILE NOT FOUND error.
How can I solve this problem?
A potential option is to create a new database file, and import all of the content from the old database file. that will clear out the funky ghost stuff.
you write you tried compile already and it did not work.
Did you try decompile first though?
First of all make a backup copy (but am sure you already did that :) )
With Access and your access file closed type from the command prompt:
C:\yourOfficeInstallPath\MSACCESS.EXE /decompile
Access will start. Click File > Open and select the database you want to decompile
Open any module and click Debug > Compile
Then save your file and close.
Open again your file and compact it.
Let me know if it solved it.

Write in registry in order to add application in start menu

I have made a program in Visual Basic and I want to add this program in user's start menu by code. How can I do that?
I know that there is a folder in
C:\ProgramData\Microsoft\Windows\Start Menu\Programs
where I can add my application's shortcut, but I think I have, also, to write in user's registry.
And that's my problem: I don't know what to write in registry in order to add app in start menu. A simple location in registry will help me if you don't know vb code.

Visual Studio 2015 RC missing using option in quick actions

I have no idea what changed, but either using Ctrl+. or right clicking to bring up the quick actions in VS2015 RC (14.0.22823.1) on a token that I haven't added the right using statement used to give me an option to automatically add it for me, along with options to create a new class and a few other things.
The last couple days it's no longer giving me the option to add the using statement for me (I use this shortcut all the time). It still has all the other options.
Anyone else run into this? I recently installed Web Essentials 2015.0 RC and Code Maid (code maid was causing problems so I removed it). Could one of those affect it?
I just had the same problem and solved it by renaming the .suo file in ProjectName\.vs\ProjectName\v14 to something VS will not find, like .suo.bak.
This will reset your project specific preferences, like open files, solution explorer state etc. Make a backup of the file or rename it so you can go back if you are missing something important.
If everything works afterwards you can simply delete the renamed file, VS will create a new one.

Problems exporting Mac App from Xcode to the computer desktop

I have a somewhat frustrating problem with exporting a compiled copy of a Mac App to my desktop and have it run. First some background...
The app contains two referenced subprojects. The first project creates an archive and the second one creates a framework. They are both used by the main project to perform certain functions.
The app runs fine within Xcode. The problem start when I archive it and try to export it to my desktop to see how well it runs on it's own. I use the regular procedures for this but when I try and start the app from my desktop, it won't load. There's a message saying that the dynamic loader can't find the framework object. The part of the error report that looks most helpful says this...
Dyld Error Message:
Library not loaded: #rpath/JXLS.framework/Versions/A/JXLS
Referenced from: /Users/USER/BuntingSimulator.app/Contents/MacOS/Baseball Situation Simulator
Reason: image not found
JXLS does exist but it's definitely not in the exported Mac app bundle. Anybody have any suggestions on where to look or what to look for? My suspicions lay in the value of #rpath and how the subproject is referenced or built within the main project.
Thanks in advance.
This was added in after I got the answer below. In case anyone needs to use this I thought I'd illustrate the changes made to the project as they are a bit obscure...
First, need to add a copy files step into the build phase into the main target. What does that mean?
The detail steps are:
1: click on the main target for the main project
2: select buid phases
3: click on the plus sign to add a build phase
4: will get a pop up box (select New Copy Files Phase)
5: change 'destination' selection to 'frameworks'
6: drag the framework object from the left panel into the name section of the
new copy phase you just created
Second, need to go into the 'build settings' of the framework target and replace #rpath to #executable_path/../Frameworks
If you are doing this for your own use, make sure you copy the JXLS to /System/Library/Frameworks.
Otherwise, look at this answer.

Changes in the code or the designer won't update when debugging

I am trying to debug my VB.net app in Visual Studio Express 2010, when I realized my changes will not update on my form-on the designer or in the code. After looking online, I found that you should clear out the "Debug" folder under the bin. That worked-for only one time. Now it went back to the older version and when I delete it again, it doesn't change. When I build the project and run it from the "Release" folder, it works perfectly, but when a error occurs at runtime, it won't show where the error is because it is running independently.
Thanks in advance.
(I have Windows XP SP3)
I had the same problem. Frustrating problem....? Close the project, go to debug bin/folder, delete these files, reopen project and rebuild it (F5).
- .exe
- .pdb
- .vshost.exe
- .vshost.exe.manifest
- .xml
it works 99.99%.......thanks
Before I'd create a new project, I'd copy all of the code-behind (including the code that creates the controls that you're not supposed to touch) into another form. That may be all you need to do. Try compiling that form and running it and see if it's good. If so, you won't have to create a whole new project and can just delete the old form.
I would think there's something causing this that would be much easier to to fix. Are there any config files or anything like that? Are you building to the right location?
It's been a while since I've done winforms, but I remember this happening in VS 2005 and I just created a new form and copied the code-behind into another winform and compiled.
Hope this helps.
mmm... if it was for me, with such a weird bug, i would create a new project then insert the files (not as a link, but a copy) in the project, and i most likely all will work fine after... Faster than finding where-the-hell is that wrong parameter...
So how do you do that ? Well create a new project, choose the folder and name, change namespace in settings if needed, then in project explorer Add existing item, then Browse and select your code and xaml (and other maybe) files. Let us know.
This happened to me as well. I believe the /bin and /obj folders of my application must've been locked for by some other application. Before manually deleting them I tried running Visual Studio as an administrator and did a Clean and a Rebuild which worked. If it doesn't work for you, try deleting the folders manually.
Close VS
Press Ctrl + Alt + Delete
Choose "Task Manager"
In the "Process" tab in "Task Manager" find your "ProjectName.EXE" and click "End Task"
Restart VS
I have the same problem, but i changed the solution config next to the start button from debug to release and that fixed my problem, try it :)
"Save all" works for me in VS 2010 VB, in Debug and Release mode.
I put the "Save all" icon next to the Run and Build icons.
First make sure your Localizable Property of you form is set to FALSE