linq2db / linq2db.LINQPad

linq2db.LINQPad is a driver for LINQPad.
MIT License
74 stars 23 forks source link

Using SQL syntax when opening an SQLite DB #93

Closed eitan-rapaport closed 1 year ago

eitan-rapaport commented 1 year ago

Hey friends,

I've been trying to use this driver on LINQPad and it works like a charm when using LINQ syntax. However, when I use the SQL syntax, I get the following error message no matter which table I try to select:

"SQL logic error no such table: X" (X being the table I choose)

The schema is properly shown on the left-hand side menu, I made sure that I am using the correct connection, and I tried multiple .NET versions, all ends the same way.

When I right-click on the DB connection, the "Use in current query" button is grayed out, meaning it's already selected.

Screenshot: image

Now, an interesting thing to add here, is that all of the above happens on a remote machine I am working with.

In my local PC it works perfectly, and to make matters even more confusing, if I just go ahead and copy the query from my local machine to the remote one, it works perfectly fine. If I type the whole thing from scratch, I'll get an issue again. Even worse is that if I copy the query from the remote machine and run it on my local machine, I'll start having the issue on my side too.

Both machines are using English(United States) keyboards.

I tried to search the web for this error, but haven't found any posts that followed through.

Does anyone have any suggestions?

Thanks! Eitan

eitan-rapaport commented 1 year ago

I found the issue. I had copied the table name from the result of the automated LINQ queries, which seemed to append an "s" to the table name, making it SiteConfigurationStorageObjects instead of a singular, Object. I'm not sure if it's by design or not, closing.

MaceWindu commented 1 year ago

There is an option on scaffold tab in connection settings to disable names normalization