can't see tables in SQuirrel - hsqldb

I am using a HSQL driver to connect to my database. I am able to connect without any errors but I can't see any of my tables in the table tree under public. I am able to create new tables which do appear, but I can't see the already created ones. Also when I check the .script file I can't see the new tables. Something strange is going on but I can’t work out what.
Anyone able to help.

I've worked it out now. It was the format of the connect string for HSQL.
I needed to add :file: in the string like this... jdbc:hsqldb:file:
Also I was using .script at the end of the file name, like this jdbc:hsqldb:.script
This was creating temp files in the format .script.lck .script.log etc.
Dropping the .script at the end of the file name opened up the database and allowed me to see the tables. Now my problem is I can't get any updates to commit. Updates happen with no errors in the console. But when I close the file and check the .script file the data is the same. Permissions I guess.
Only posting this answer to help others that might get stuck at the same point.

Try here:
How can I list all tables in a database with Squirrel SQL?
Where most of us fails is to choose the right schema in the Catalog dropdown. (Just above the Objects tab). But there are other ideas if you follow the related question.

Related

Fixing a broken database .NET

Okay so I am working in Web Forms but the problem would also apply to MVC I am assuming since both have the option of creating a users database on project creation. I deleted a data table on accident and updated the database instead of deleting the database itself because I was trying to recreate it with the seed data. I didn't realize that deleting a data table would do something different from deleting the database itself. The only backup I have is pretty old, so I would prefer to use a different way to fix things if that exists. How would I fix things?
I have it working now. What I did to fix it was I went to my back up although it could have just been a brand new project, both would have been fine, and I copied the SQL script for the data table that I deleted. Then I went to my broken program and created a new data table in the spot where it was before and replaced the code with the code from the back up. I saved it and hit update and it updated the database for me.

SSAS Tabular How to Change the connection of a table

I created a Tabular model using VS 2013 (because later versions don't support BIDS helper (which we use for creating a folder structure organizing all measures and dimensions within the model)). After working on it for a while I noticed that I was missing a table, so I went back to go get it. The only mistake which I made was that I ended up creating a new data connection in the process. Short of dropping those tables and recreating them, is there a simple way for me to change the data source of that new table so that I can delete the redundant connection to my database?
A colleague shared the following link: http://jakubka.blogspot.com/2013/11/how-to-change-connection-string-for.html.
While changing the code in this way most certainly comes across as being hacky and is probably not the highly recommended way to do things; it worked! Took me less than 5 minutes to fix and it was as simple as described in the link...
Jakub K (author of the article), thanks, man!
I encountered this issue today. I have VS 2017 and co-worker showed me how to do this.
Create New Data source in the Model(.bim file)
Save and close .bim file
Right click the .bim file and view code . This gives you an editable view.
Edit the connection on all the tables you want changed, not the original connection.
Save and exist .bim file
Open .bim file and confirm change.
In this case I use Tabular Editor.
There is a good article about it Tabular Editor Tricks - Convert to Legacy

.SQL export from PHPMyAdmin to Excel or CSV

I inherited some old records for a company I volunteer for. One of the old files is an SQL Dump from their old webpage, and I would like to get the data from one of the tables for their use into Excel.
-- MySQL dump 10.11
The dump drops the table if it exists, creates the table new, and then inserts all of the data.
Is there some easy way I can get this data into Excel on my PC? I don't have SQL Server or anything like that loaded... I assumed there was some easy way to get a CSV or Excel file out of it but I have failed to find this yet without first uploading the dump to some SQL Server.
Unfortunately I don't think that there is any way to export a dump file into an excel or .CSV file. The reason for this is that the dump file is actually a collection of Select statements instead of the actual data itself. SQL servers do this to prevent a whole list of problems that can occur when you try to manipulate raw data manually.
Lucky for you, MySQL offers a free version of their server. You can find it here: http://dev.mysql.com/downloads/
I think you are best off downloading this and restoring your file as a new database. This has the added benefit of allowing you complete control over the data from that point on. Exporting to excel would be easy at that point however, you may find it a lot more fulfilling to continue using MySQL server.
Hope this helped.

Change DB that Access query points to

I'm trying to make a query in Access 97 point to a different database. I cannot find out how to change the db.
I've tried adding another odbc connection but it doesn't give me the option to choose it when running the query.
I've tried to create another query but it still has the old db tables and i cannot choose the new db tables.
Any suggestions would be much appreciated.
thanks,
Nighmares
Try viewing the SQL source of your query. Is the old database name there? Can you just replace it and save your change? Another option would be to point your existing ODBC connection to the new database.
when you add another ODBC database Access will give you the option to add tables from it. You'll need to add whichever tables you need or you won't be able to access them via design view.
You can always use the Connection object to dynamically connect to any DB.

Netbeans - generating entity class from database

I am using netbeans IDE 7.1. I am trying to generate entity classes from a database(sql server). I am able to setup the connection to this remote datasource but in the New Entity Classes from database Wizard the tables are not showing up and at the bottom it says select atleast one table.
I could execute queries and browse through the tables from the netbeans databases service.
Can someone help me to fix this..
Thanks
maybe your schema is not selected correctly, check on service windows->database->your connection(the bold schema is a default selected schema) if it wrong, right-click->properties, and change your schema to public, all the tables that you created are here normally
hope useful :)
I faced this issue and the only way I could get it to work was to create a new connection every time. Once i created a new connection it would show me the tables and I could use it, otherwise it would just leave the list empty
In the newer versions of NetBeans if you create a database connection with default schema, it will take mysql as schema name and generate the connection string.
So goto your DB connection in NetBeans and edit your connection url.
Example :
Change
jdbc:mysql://localhost:3306/mysql?zeroDateTimeBehavior=CONVERT_TO_NULL
to
jdbc:mysql://localhost:3306/YOUR_SCHEMA_NAME?zeroDateTimeBehavior=CONVERT_TO_NULL (add your schema name in the connection string and save)
I had to go into Glassfish console and create a special connnection pool and resource. The connection pool had to be res-type="java.sql.Driver" (not datasource). Then when creating my entity, I picked this new resource from the list and it worked, my tables showed up.