MySQL Workbench: How can I see the detailed SQL query and errors when I use the "Apply" button? (confirmation popup) - mysql

I recently upgraded from MySQL Workbench 5.2.47 up to 6.1.
After making changes to a table via the Gui grid interface on the old version, I'd hit the 'Apply' button and have a popup confirming to make the change. This popup had the SQL code that would run in order to make the change that I made via the UI interface. I would then confirm the action and get a success or failure popup. If a an error occurred, I could see the detailed error in order to easily troubleshoot the problem.
With the new version, I make a change in the GUI interface and hit the 'Apply' button. No confirmation popup, it just executes. The result is a small snippet in output window. This is fine unless there's an error, in which case it has a very generic message. "1 error(s) saving changes to table XYZ". I have not found how to access the detailed error message, either by right clicking the row or looking in the preferences.
So, how do I get the popup confirmation with SQL query and error messaging to work in the new version or, at the very least, be able to see detailed SQL query error details?

Functionality restored in CE release: 6.1.7
http://dev.mysql.com/downloads/file.php?id=452662

It is indeed a bug :-(
In the MySQL bug database:
http://bugs.mysql.com/bug.php?id=72169
http://bugs.mysql.com/bug.php?id=72155

Until they don't fix the bug you can try to close the Query Tab. When it asks if you want Save the Changes or Not, you choose Save and then it shows the detailed errors :)

Related

How to fix error "Cannot resolve column..."

I am developing Java web application what based on Spring Framework, MySQL, JPA. I have a problem when try to persistence data from HTML form to SQL database, then I try to debug and fix. I am using IntelliJ IDEA Ultimate 2017.1. I catch error:
Cannot resolve column 'product_name' This inspection controls whether
the Persistence ORM annotations are checked against configured
Datasources
This is screenshot:
How to fix it?
For those who just want to disable this check, go to
Intellij IDEA -> Preferences -> Search "Unresolved database references in annotations" and uncheck it.
(macOS Mojave and Intellij Ultimate 2019.3)
This will disable the inspection and remove all the "Cannot resolve column…" errors on the #Column annotations. Intellij will stop checking if the String column names exist in the database tables. Do it at your own risk.
Open Persistence tool windows, right click on module, then set DataSource. IntelliJ IDEA will validate source code by real SQL database.
You have to manage your data sources. I followed the steps detailed here
https://www.jetbrains.com/help/pycharm/managing-data-sources.html.
In my case, I did the following (I am using Pycharms, but I assume the process is similar for other Jetbrains IDEs):
Bring the Data sources and drivers window by going to view > tool windows > database
Click the wrench icon to configure the db connection
Configure it, and try that the connection works with Test Connection
Pycharms should now autocomplete fields in the db.
If it still doesn't work:
try restarting Pycharms.
go to options (command + ,), then search for SQL, select menu SQL Resolution Scopes, and try adding a scope by clicking +, then selecting your current project folder as path, and your db as the resolution scope
I found a TEMPORARY work around for this bug.
Please before you follow my workaround do exactly what #Benjamin Crouzier's answer suggests. THEN, go to any of the unresolved columns, right click it and they click execute. and Boom annoying warning SOLVED :)
After trying all the solutions above, I solved this by clicking Refresh in the database tool window.

Unable to resolve valid table in PhpStorm

I'm getting unable to resolve table errors appear in php files containing SQL querying valid tables.
If I Ctrl + Enter over the query, then I get expected results in the DB console, and if I expand the database in the DB explorer tab then I can see the tables.
It's not affecting code execution, but it's annoying because it catches my eye when writing code, and it masks real SQL errors.
I've tried refreshing the database connection, and I've verified that the php tab is connecting to the correct database.
In 2017.2 I had to go to
Settings > Languages & Frameworks > SQL Resolution Scopes
and add my project and database link in there to get it right again.
Try re-creating DB connection from scratch (delete existing one and create it again).
Thinking of possible reasons ... I can think of this scenario:
working with project in current stable version (currently 2016.1.x);
trying EAP build for next version (2016.2 at this moment) on this project and make some DB-related changes there (even simple syncing DB);
going back to stable version (2016.1.x) .. and because new version uses newer file format/versioning for DB-related data (cached DB structure etc) IDE may start ignoring "unknown/newer" format for such data and instead of throwing appropriate warning it just "silently" throwing "unresolved table" message.
No other ideas.
I was getting what OP was getting, and the problem was my DB Server was MariaDB and i had MySQL selected as the SQL Dialect.
See File > Settings: Languages & Frameworks > SQL Dialects.
Faulty error pollution DRIVES ME NUTS TOO!
If I start having SQL resolution issues, I will check my resolution scopes (settings -> Languages & Frameworks -> SQL Resolution Scopes).
Generally I have the most issues when my project mapping is set to 'All Data Sources' by default.
The following steps always fixes it for me:
Click the Project Mapping Dropdown
Uncheck the global 'All Data Sources' setting (required to make other selection available)
Click the drop down arrow for your Database connection
Check 'All Schemas' (Or Specific Tables)
Click OK to close the settings window
Your false resolution errors should disappear after the next parse cycle.
You aren't limited to applying the above steps to just one DB connection, you can do it for all connections in your project.
Sometimes adding a custom resolution scope will work as well, but it is hit or miss for me.
Click the plus sign (top right)
Select the file you are working on and hit 'OK'
Select the 'Resolution Scope' column
Deselect 'all data sources'
Select the specific DB resources you want
Reconnecting to the DB never works for me.
Specifying the table works well... but it can become very cumbersome as the project grows.
I have also run into an additional situation where PHPStorm would only resolve some of my queries, no matter what scope resolution settings I used. However, after I attached a console to my file, they resolved just fine.
(Search for 'Attach Console' in Help | Find Action. You can also add it to a 'Quick List' or Keymap it.)
Although this answer is specifically for phpstorm, I had this same issue in IntelliJ and none of the above fixes worked for me. I had my scope added, everything was active. I could query the database in the console window perfectly fine, and I was totally stumped.
Eventually, I noticed some text in the database panel that said 0 of 4 in tiny text. It looked like this:
Upon clicking on the 0 of 4 text, I discovered there were no schemas added to the connection, even though a default database was set upon making the connection originally. Going to that page allows you to add schemas. Be sure to either select "All schemas", "Current schema", or the specific database that you want to use with your connection.
Changed dialect to MariaDB on global and project level.
OR
To dismiss this error in PHPStorm versions before 2017 which have no SQL Resolution Scopes option:
Go to File
Go to Settings...
Go to Editor and then Inspections
In SQL chapter uncheck Unresolved reference
Click Apply and then OK
Adding database name before the table name worked in my case.
For instance, instead of writing SELECT * FROM Client, put SELECT * FROM database.Client.
I will add another answer, because for me, it was a completely different (embarrassing) cause:
I somehow forgot to add the database name in the data sources general settings (where you also set the host, user and password).
In my case, I have clicked the right button in the SQLScript and change the Dialect to "Generic SQL". It worked for me.
I solved this problem as follows:
CTRL + SHIFT + F10
new query console
Write a selection query to the database, for example:
SELECT * FROM user WHERE user_email='$email' AND user_password='$password'
Enter your code page and click on the table name in the query
ALT + ENTER
run query in console
Select the console you created
First, you need to check the Schemas tab, and make sure you've added the database.
If the unable to resolve table error stills appears, there're two options to fix this:
1.You can edit the properties of the Data Source and add the name of Database, then you can see that select * from table works well.
2.On the other hand, you can also use sql like this select * from database.table. It works for me.
By the way, in many situations, autocomplete can be very useful.
[PHPSTORM]I solved this problem by setting
Languages&Features
SQL Dialect
adding your current file into path and modify its SQL Dialect as a server you are using.
NOTICE!!!!! mine is MySQL but it is exactly MySQL causing problems, after switching into [generic SQL] PROBLEM SOLVED!!!

What contract am I not specifying?

When I try to run my Windows Store app, it won't, and shows me this:
..."does not support the contract specified"? What contract? I'm not implementing any contract; I assume it means the Settings contract or some such, but I'm not doing any of those yet.
I went to the Help page suggested, and it says, in part, "To diagnose these errors
There are no sure ways to fix these errors. Use these techniques to diagnose the problem."
The first suggestion is:
Open Event Viewer (on the Windows Start menu, search for Event Viewer.) In Event Viewer, navigate in the tree to the Application and Services Log\Microsoft\Windows\Apps folder.
Filter the view to event Ids: 5900-6000
Examine the log and see what occurred.
Windows 8.1 only brings up web pages when I search for "Event Viewer"
Actually, I did write a utility to catch event logs, and I ran that. I found these:
***Type: Error
Source: Microsoft-Windows-Immersive-Shell
Time Generated: 11/27/2014 15:10:39
Message: Activation of app App.adaf78a74.a8c80.a4ff5.a99ca.a97636d548196_8wekyb3d8bbwe!Designer.App failed with error: -2144927148 See the Microsoft-Windows-TWinUI/Operational log for additional information.
Type: Error
Source: Microsoft-Windows-Immersive-Shell
Time Generated: 11/27/2014 15:20:08
Message: Activation of app axXAndSpace.Visits_qtyjefqf75sa6!App failed with error: -2144927148 See the Microsoft-Windows-TWinUI/Operational log for additional information.***
But where is "Microsoft-Windows-TWinUI/Operational log"?
The second suggestion on the Help page was:
Use the native debugger
Configure the project to run under a native debugger.
In Visual Studio, set the Debugger Type to Native Only on the Debug (Debugging in C++ and JavaScript) page of the property pages of the start-up project.
Look at the exceptions being thrown by looking at the output window. You might want to configure the debugger to stop when these exceptions are thrown.
I did that, but it gave me no more information than previously - nothing at all displays in the Output pane.
What could be the cause of this?
UPDATE
Just to update the progress:
Based on Iris Classon's suggestions, I went to Control Panel to see if my app was installed so that I could uninstall it, but it's not in that list.
If I search for the app by typing its name, it tries to start up - its splash screen displays, but goes no further than that.
I went to Program Files\WindowsApps, and when selecting it got, "You don't currently have persimmons to access this folder, click continue to continually get access"
That leads me to "You have been denied permission to access this folder; to gain access to this folder, you will need to use the security tab"
Click the "security tab" link takes me to that tab, and a "For special permissions or advanced settings, click Advanced"
I do so.
That takes me to a Permissions tab, which says, "You must have Read permissions to view the properties of this object; Click continue to attempt the operation with administrative permissions"
I then selected (one at a time, as that is all it allows):
Trusted Installer : Full control
System: Read, Write, and Execute
System: Full Control
Administrators: Read & Execute
But so far, none of that seems to do anything good.
UPDATE 2
This problem has just "gone away" today; I don't think it was anything I did. I added a UserControl, tried running the app again, and now it runs - I don't see that error message. However, I do see a seemingly unrelated one. (at least I got further).
I just had this problem on a fresh install of Windows 8.1 on my laptop. I'm not sure which one of these steps solved it, but until somebody can give you a more exact answer here is something to try as I am sure you are keen on coding.
Only Store Apps run from VS gives that error, other Store apps work fine.
I first of all changed permissions on my WindowsApps folder under Program Files and made sure that I had full access to the folder and sub folders. Restarted the laptop, still no luck.
Then I set up an admin guest account (just something I tend to do for when I need to record tutorials- so not related to trying to solve the error). Out of curiosity I tried to create and run the same Windows Store App and got an error that another user had installed the app. Strange, how was it installed if it gave me the error that it couldn't activate the app on the main account?
I logged back in as the main user and uninstalled the application (which was showing up as installed), and I can now run any Store App from VS without problems.
Not sure this is an answer since I'm not sure what made it work, but give it a try and hopefully somebody else can clear this us up. I'll investigate further, but I'm on a train right now with poor WiFi connection :)
Best of luck!
I had the same scenario, here are the steps I did to resolve:
I tried to create packages, chose not to associate with the store.
It said that the certificate is expired, I created a new test certificate.
I created the test packages successfully.
Tried to run the project from VS and it finally ran.
I believe all of this had to do with the certificate. very frustrating and time wasting issue.
I also had the same problem and following steps fixed it. Hope it will help some one else.
Open the appxmanifest file
Go to "Packaging" tab
Select "Choose Certificate" and select "Pick from certificate store" and select your cetificate and click on ok

MS-Access compile options

Is there a compiler option in ms-access (2003) that requires all vba code to compile before allowing any code to run? I'd like to be able to turn it off. I've tried the unchecking the 'Require Variable Declaration' and 'Auto Syntax Check' options, but no result.
Background information
I've just been given an ms-access database that runs fine on their machine but will not run on my machine. I get this error message on startup:
"The expression On Open you entered as the event property setting produced the following error: Method or data member not found"
This is caused by vba compilation errors in what looks like redundant code. Interestingly the code doesn't compile on either machine, but on their machine it database is usable on my machine it isn't! I assume its something simple like a compiler option, except I can't find it!
(Before anyone mentions it I know that the real solution to the problem is to fix/remove the bad code)
Code will run in MS Access without all code compiling, however, On Open is a form property that runs code when the form is opened, so the code in that event will be compiled and run when the form opens. I have encountered this error before when a version of Access is run on a PC that has two versions installed (specifically, <2007 and >=2007). For me, the solution was to choose Repair from the Help menu.
Access has a /decompile command line switch. See the accepted answer to this StackOverflow question.

How to Prevent the "Please tell Microsoft about this problem" Dialog Boxes

We have an error that we can't seem to find and don't have the need/resources to try and track it down. What we do need to do is just keep the freaking "Please tell Microsoft about this problem" dialog boxes from cluttering up the server.
It is from an MS-Access error (we think) but I can't find where Access is installed (I don't think it is); there is no MS Office directory on any of the drives.
If we could just stop the dialog boxes from appearing that would be great.
Thanks.
Spec: Window Server 2003 sp2
From http://www.codeproject.com/KB/exception/UnhandledExceptionClass.aspx:
If you also want to disable the Windows “Send Error Report” dialog on your computer, right-click on the “My Computer” icon, select “Properties”, switch to the “Advanced” tab, and click on the “Error Reporting” button. In the Options dialog, select the “Disable error reporting” radio button:
Compare also http://www.codeproject.com/KB/exception/ExceptionHandling.aspx for general .NET Exception Handling sanity.
I don't think you realize jusy how serious this error might be. These errors pop up under severe conditions like buffer overflows, null pointer dereferences, division by zero errors, etc. Given that you mentioned that this runs on a server, you potentially (depending on your situation) have a network facing, easily exploitable program!
As others have suggested, you can turn off error-reporting system wide, or you can use the SetErrorMode API to disable it for just your application, but again I would strongly advise to investigate and fix the problem at its root!
Well, I would try and figure out what application is using Access. Not knowing what is running is a real issue, especially when it is having unhandled exceptions!
As far as just disabling?
Try:
Right click 'My Computer'
left click 'Properties'
left click 'Advanced' tab
left click 'Error Reporting' (near bottom)
left click 'Disable error reporting'
It's called the Windows Error Reporting Dialog. You can disable it by following these instructions:
http://www.windowsnetworking.com/articles_tutorials/Disable-Error-Reporting-Windows-XP-Server-2003.html
However, I would be concerned with why you are getting those error messages. You are just concealing a problem which could be very bad.
Since I see three different people posted instructions on how to disable the dialog on their own machine, I'll post this again as an answer instead of just a comment:
They don't want to do that on their customer's machines, because that will disable any application from using the dialog. They just want to prevent it from coming up for their application.
It's not concealing anything, if a program crashes windows will still tell you. The difference is that it won't compile a core dump and try to send it to microsoft for you. It's very useful to disable this garbage.
When working in .net, you can catch all unhandled exceptions (which is what causes this message). But I'm not aware of a way to do the same in Access.
http://devcity.net/Articles/60/1/unhandled_exceptions.aspx