TablePlus-Windows icon indicating copy to clipboard operation
TablePlus-Windows copied to clipboard

Error: Can't detect table

Open EfekanC opened this issue 1 year ago • 13 comments

Please answer the questions below, it helps us to track the issue.

  1. Which driver are you using and version of it (Ex: PostgreSQL 10.0): MySQL 8.0

  2. Which TablePlus build number are you using (the number on the welcome screen, Ex: build 81): 290

  3. The steps to reproduce this issue: When running an update from a query the following message is received

image

Noted: If the bug is related to data, please attach an example SQL data.

EfekanC avatar Jan 07 '25 14:01 EfekanC

Hi @EfekanC it's impossible to reproduce the issue with the step above.

It does work with a normal select. However if the result from multiple tables (such as join query) or cross database, it may not work. (it is unsafe to do so, and also not enough information to generate update query)

huyphams avatar Feb 20 '25 11:02 huyphams

Hi @huyphams thanks for your reply

This happens when I run a select query (with a join) , but update a column by clicking into it and editing (as opposed to writing an update query). It works fine on build 284 and maybe 288 as well, but the error appears on any build later than that.

I am currently using build 284 which is working as intended.

Thanks

Example query/process to reproduce:

SELECT x, y, z FROM table_1 JOIN table_2 ON table_1.a = table_2.id WHERE x/y/z = 123;

Click into column to edit, press ENTER -> Error: Can't detect table

EfekanC avatar Feb 20 '25 11:02 EfekanC

I have the same problem:

  • Windows version.
  • MSSQL
  • Query without joins (eg. only select * from table)
  • Column names are fully upper-case or lower-case. Never a mix.

marc-nds avatar Feb 26 '25 07:02 marc-nds

Hi @marcvanbreemen, that's strange—I can't reproduce your issue. Could you please provide more details or share a sample of your data so I can investigate further?

sonswift avatar Feb 26 '25 07:02 sonswift

Hi @marcvanbreemen, that's strange—I can't reproduce your issue. Could you please provide more details or share a sample of your data so I can investigate further?

I'm currently testing with MSSQL Express 16.0.1135 and the latest TablePlus version on Windows.

I've created the following table:"

CREATE TABLE [mfs].[test](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[text] [nvarchar](255) NOT NULL,
 CONSTRAINT [test_pkey] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

I added one simple row, with the text value abcd to test (see screenprint). It works in the data view. It doesn't work in the result table of a query.

Image

marc-nds avatar Feb 26 '25 08:02 marc-nds

Hi @marcvanbreemen, perhaps you have the "Lazy load item in schema" feature enabled. When this feature is turned on, only the Tables & Views of the currently selected schema are loaded, while those from other schemas will not be loaded.

Image

If you want to work with data in the mfs schema, you can switch to it using the dropdown at the bottom left of the application.

Image

If you want to access all Tables & Views across different schemas, you can disable the "Lazy load item in schema" feature. This will load all Tables & Views when connecting to the database. (Note: If your database contains a large number of schemas, tables, and views, disabling this feature may slow down data retrieval.)

sonswift avatar Feb 26 '25 08:02 sonswift

I already had chosen the schema used.

I found a solution to the problem.

It doesn't work when I don't use a table alias, like this:

select * from dbo.test

If I then add an alias like this:

select * from dbo.test t

It suddenly works.

If I remove the alias it keeps working, until I start a new query in a new tab.

I think this is still a bug. At least the error should suggest a possible solution and not leaving the user in the dark.

marc-nds avatar Feb 26 '25 09:02 marc-nds

Thank you! I will check again and let you know if there are any updates.

sonswift avatar Feb 26 '25 09:02 sonswift

I have a same error when I try to delete row. However, It show cannot delete table, it is weird Step:

  1. select * from table
  2. delete specific row by delete key/right click and choose delete option
  3. message show cannot delete table

Image

Version 6.4.1, Mysql

tungserver avatar Apr 02 '25 02:04 tungserver

Hi @tungserver, thank for your feedback. Let me check.

sonswift avatar Apr 02 '25 02:04 sonswift

Thank you! I will check again and let you know if there are any updates.

It's 6 months later and the problem still exists.

NB: It's ok to buy an expensive tool like this if it's updated regularly, especially the reported bugs. Now I don't know what to think.

marc-nds avatar Aug 06 '25 14:08 marc-nds

Hi @marc-nds, could you please provide the version of the application you’re currently using, along with the type of database and a sample query you’re running? This issue has already been addressed, so if you’re still encountering it, I’ll help investigate right away. Thank you for your feedback!

sonswift avatar Aug 06 '25 15:08 sonswift

could you please provide the version of the application you’re currently using, along with the type of database and a sample query you’re running?

I'm using TablePlus v6.6.2 along with MSSQL v16.

You can use the example I posted on February 26.

marc-nds avatar Aug 11 '25 08:08 marc-nds