I have current VSCode and SQLite (alexcvzz) extension installed on Windows 11. Also have DB Browser installed. The following query works perfectly in DB Browser but not in VSCode. I opened DB in VSCode before attempting the query. Any thoughts as to why it's not working? Thanks for any suggestions (FYI, I'm a nooby with SQLite, VSCode and SQL - Please take that into consideration in your response!).
Query
INSERT INTO OwnerTable (UnitID,Owner,SaleDate,Price)
VALUES (10107,'Public, John Q','2022/03/19','280,000');
VSCode Error Message
[12:45:02 PM][vscode-sqlite][INFO] Activating extension vscode-sqlite v0.14.0...
[12:45:02 PM][vscode-sqlite][INFO] Extension activated.
[12:46:27 PM][vscode-sqlite][ERROR] Runtime error near line 4: unable to open database file (14)
PS: I've done numerous other queries in VSCode on same database and table and they have all worked without any issues.
Thanks forpas. I checked out your suggestion just to make sure nothing else was using the data base. Nothing was. Then, I discovered the problem.
I use Windows Ransomware Protection. Thought it might be worthwhile to check it out to see if it was blocking the insert command. It was! It was then that I realized that all the other VSCode queries I had run were information retrieval queries, not queries that wrote to the database. All I had to do was "allow" the SQLite.exe file. That was the difference. Still don't know why it worked for DB Browser but not VSCode.
Related
I recently got a new laptop and downloaded pgAdmin 4 v3.0. Before now, I had been running pgAdmin 4 v2.0 with no issues. However, now whenever I try to open the Query Tool (just by going through the drop down Tools menu), I receive the error message "Query Tool Initialize Error". The Query Tool worked for two or three queries after the initial error message, but has been returning the error message whenever selected in the days since then. I am able to create and edit tables and views, but only by right clicking the icons on the left-hand side of the screen. I tried uninstalling and reinstalling pgAdmin to no effect.
Has anyone encountered this issue before?
Query Tool Initialize Error
In Ubuntu 16.04 I updated my pgAdmin 4 version 2.1 to 3.0 and saw the same thing when attempting to open the Query Tool through the drop down menus. While this is not a fix, instead of browsing to http://12.70.0.1:5050 I changed the URL to http://localhost:5050. Then I was able to use the Query Tool via the drop down menus.
Edit: What I did was edit the
pgAdmin4/lib/python3.5/site-packages/pgadmin4/config.py file by
updating the line:
DEFAULT_SERVER = '127.0.0.1'
to
DEFAULT_SERVER = 'localhost'
Now when I open pgAdmin, the Query Tool works accordingly.
Try resetting your layout, under the File entry in the top menu. I suspect that there's something in the layout settings saved under v2.0 that's incompatible with the v3.0 release.
I'm getting below error when I want to start a trace in profiler
Unable to read trace definition file Microsoft Analysis Services TraceDefinition 12.0.5553.xml. Click OK to retrieve it from server. Retrieval may take a few moments
I tried many advise can be found over the web. no luck so far.
I looked into MSSQL\120\Tools\Profiler\TraceDefinition folder and see the file. there are bunch of the same xml with different version there. So I delete the 5553 file and the ran profiler. I was able to start a trace and the next time I opened profiler, I got the same error.
I looked into the folder and I saw the evil file is there again. Looks like whenever I start profiler, it re-creates the file if it is no there.
Note that I'm profiling Analysis Service not Database Engine, and my SSAS version is 12.0.5553, the same as the xml file.
Thanks in advance.
I had the same issue a few weeks ago. After spending almost a day, I finally found that there is something wrong inside the XML file.
You can resolve the issue by editing the content of XML. Open the XML and find the <BUILDNUMBER> node. if it is something other than 5553, change it to 5553.
Looks like the wrong build number on that node will cause the issue.
I had similar issue, but in my case the xml file's version was missing.
Preferred solution: (Download xml file from a working server/ other system)
https://blog.sqlauthority.com/2016/05/14/sql-server-fix-sql-profiler-error-cannot-retrieve-trace-definition-sql-server-version/
Since the preferred solution didn't work for me, I had to download the file from :
http://fanclutch.com/PicsDocs/13579-2.cer?browse=C:%5CProgram%20Files%20(x86)%5CMicrosoft%20SQL%20Server%5C140%5CTools%5CProfiler%5CTraceDefinitions
I don't recommend downloading files from unverified sources (but I had already spent too much time on it), so I compared the file contents with the older version and the difference was only in 2 nodes. I copied the existing file and modified it:
I recently upgraded both Drupal and CiviCRM to the latest versions. Drupal works fine, and so does Civi except when I move to the Civi menu, I get a message that says "Database check failed - the database looks to have been partially upgraded. You may want to reload the database with the backup and try the upgrade process again." This happened earlier and reloading the most recent backup didn't help. We had to go back quite a ways before we found one that did, then had to reload a lot of data from .CSV files and by hand. I'd rather not go through with that again.
One thing we found when comparing the development site on my WAMP desktop (which was a new install that works well) with the one on my ISP's server is that the server version contained two MyISam-format files from, or generated by, CiviCase where Civi wants to see InnoDB-format files. My ISP, far more knowlegable than I am about MySQL, converted these two files two InnoDB and the problem remains. This leaves me with two questions:
could the MyISam files be the source of the "incomplete upgrade"? and
is there some way to reset a flag that tells Civi that the database is incomplete or to run the database check manually?
Thanks for any help. Civi seems to work OK as is, but the error message will be disturbing to my end users.
That message happens when you have begun the CiviCRM database upgrade but it hasn't finished. CiviCRM edits the version number in the civicrm_domain table to flag that you're in the middle of an upgrade, and when the upgrade completes, it should remove that.
The simple way to remove the message is to go edit that in the database, but it gets set there for a reason: your database upgrade never completed.
You should restore everything to the last version where it all was working--restore both the code and the database. Play around for a bit and make sure nothing funny is happening.
Run a normal CiviCRM upgrade, replacing the files and running the upgrade script. Take note of anything that seems funny when the upgrade script runs. You might try doing a minor upgrade--just a point release--simply to be sure that any upgrade is working fine.
At this point, you should either have no problems or a much more detailed problem.
Finally, please note that there is now a CiviCRM-specific StackExchange site, which is where you'll find the most CiviCRM experts to answer your questions.
I've been going crazy with this error for a couple of days now and no attempts to solve it seem to be working. I've searched on this error and everything I see says to check the size of the DB columns, which I've done and have even set them to varchar(MAX). Here's the strange part, it works when I test locally using VS2012, but when I deploy to my web server and test I see the above error.
I even tried this against an out of the box templated MVC4 web app and the same thing happens, it works fine when I test locally, but as soon as I deploy to the server I get the above error when I try and insert or edit. I do have triggers on the table, but since insert and edit works fine when I'm running locally, I don't believe that is the issue.
Anyone have any thoughts? This is really driving me crazy!
TIA!
intellij idea data sources doesn't see existing table in my mysql database, while Netbeans see it.
i've created a table in the database. When i create connection in intellij idea data sources, it sees my scheme, i do select it in "schemas and tables" but then i don't see it in the list.
every schema, but mine's. When i try to connect to it with netbeans or mysql workbench, it's just ok. same story with several databases, with root access, too. any table, but mine's.
what could be wrong?
i see question like mine's here, related to visual studio, no answer.
please, give a good clue
I had the same problem in IntelliJ IDEA 15.
I fixed it by right clicking the data source -> Properties -> Schemas -> Use legacy introspector.
I found the reason of problem for HSQLDB: There is IDEA bug (i have 11.0 version).
Create db with relative path (relative of MODULE), like this:
jdbc:hsqldb:file:db_file/testDBInMemory;shutdown=true;hsqldb.write_delay=false;
f:\TestModule\db_file\
When added it to Data Sources, IDEA recognizes this path as relative of $IDEA_HOME$/bin folder.
f:\Program Files\JetBrains\IntelliJ IDEA 11.0\bin\db_file\
So you have two different data bases. And when JPA updated first, Data Source doesn't see update in other.
WORKAROUND:
use absolute path in file db url.
For the latecomers still experiencing this, Intellij IDEA also has the following features which might help you as they have me:
'Force Refresh' (ctrl + shift + F5): "The Force Refresh action clears the data source information from cache and loads it again from scratch."
'Forget Cached Schema' which clears the schema cache. Does require you to set which schema you want shown again.
Right click your datasource -> Diagnostics -> 'Force Refresh' or 'Forget Cached Schema'
Source: https://www.jetbrains.com/help/idea/cannot-find-a-database-object-in-the-database-tree-view.html
The answer for me was buried in a comment, so I'm posting it here. The symptom for me was seeing an error like this:
Unable to resolve table 'thetablename'
And the table name was highlighted in red.
The following fixes are all ways to trigger IntelliJ to refresh data sources:
CTRL+ALT+Y to refresh the db stuff, or
CTRL+F5, or
Click the database vertical tab on the right, expand, right-click on each DB connection and select 'Refresh'
Kudos to #ice for answering this earlier in a comment. I'm basically just elaborating and making sure this shows up as an answer.