Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ef Core 8 Error Method ExecuteSql #1199

Open
ViperTecCorporation opened this issue Oct 24, 2024 · 2 comments
Open

Ef Core 8 Error Method ExecuteSql #1199

ViperTecCorporation opened this issue Oct 24, 2024 · 2 comments

Comments

@ViperTecCorporation
Copy link

ViperTecCorporation commented Oct 24, 2024

Olá estou tendo este problema ao executar este sql atraves do entity framework core, isto não ocorria no .Net 6 to testando para migrar o projeto, tem alguma dica de solução?

Hello, I'm having this problem when running this sql through the entity framework core, this didn't happen in .Net 6, I'm testing to migrate the project, do you have any solution tips?

firebird 4.0 estou usando.

con.Database.ExecuteSql($"ALTER SEQUENCE "RDB$2" RESTART WITH {ultIdPersons};");
con.SaveChanges();

{"Dynamic SQL Error\r\nSQL error code = -104\r\nToken unknown - line 1, column 37\r\n?"}

@ViperTecCorporation
Copy link
Author

And another question, I have a legacy database that I need to maintain due to an integration with our other software, the database engine is Firebird 2.5 in version 6 of .Net core, I was able to use the Where method of the entity migrating the project to test in version 8 I get the following error

{"Dynamic SQL Error\r\nSQL error code = -104\r\nUnexpected end of command - line 3, column 269"}

Is there anything you can do to mitigate this problem?

@cincuranet
Copy link
Member

And another question, I have a legacy database that I need to maintain due to an integration with our other software, the database engine is Firebird 2.5 in version 6 of .Net core, I was able to use the Where method of the entity migrating the project to test in version 8 I get the following error

Firebird 2.5 is not supported. Unless you can replicate it on at least 3.0, you are on your own. But I'm happy to take PR.

Hello, I'm having this problem when running this sql through the entity framework core, this didn't happen in .Net 6, I'm testing to migrate the project, do you have any solution tips?

ExecuteSql is not available on EF Core 6, so I'm not sure what you called before. But the problem is that ALTER SEQUENCE needs literal, not parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants