Dapper icon indicating copy to clipboard operation
Dapper copied to clipboard

Is Dapper Support SAP Sql Anywhere Database ?

Open sravangontla opened this issue 4 years ago • 6 comments

Hi Team, Can you please confirm that Dapper supports SAP Anywhere Database, If yes guide the documentation how to connect and so on...

Looking for : Asp.net core Dapper SAP SQL Anywhere (database)

sravangontla avatar Dec 14 '21 16:12 sravangontla

In the general case, it isn't really a question of supporting or not supporting specific ADO.NET providers. Dapper just uses the general ADO.NET API. If someone reports a problem with a specific provider, we sometimes add minor mitigations, where possible, but: "we the maintainers" probably haven't tried it on SAP SQL Anywhere. If you have access to that, then please let us know how it goes!

mgravell avatar Dec 14 '21 17:12 mgravell

Thanks @mgravell

I have small issue with Dapper while working with SQL Anywhere. As I am using inline SQL Queries its working as expected. It throwing an error while using parameterized query with parameter starts with "@" returns not found parameter.

More error details : https://stackoverflow.com/questions/30688879/why-does-sql-anywhere-ignore-the-named-parameter

So is it possible to change the "@" to ":" in dapper ?

sravangontla avatar Jan 06 '22 07:01 sravangontla

The idea with Dapper is that you own the SQL, not us. So: assuming that you're using Dapper just the core library (not "rainbow", "contrib", etc): you would just ... use : in your SQL. If you're using another library (such as the ones mentioned, or anything else) that generates SQL that is fed to Dapper: you'd need to specify that library.

mgravell avatar Jan 06 '22 10:01 mgravell

Thanks @mgravell Thanks for your clarification. I will check with "Dapper Contrib" Team.

sravangontla avatar Jan 06 '22 10:01 sravangontla

pssst.... that's probably also "us" - or at least: there's nobody else; but: if the issue is "contrib is using @" - the point I'm making here is that you didn't tell me (until now, indirectly) that you're using "contrib".

I doubt that "contrib" currently has any SAP specific logic; you're welcome to check and investigate, though. The "adapter" logic is honestly pretty rough and ropy here: https://github.com/DapperLib/Dapper.Contrib/blob/main/src/Dapper.Contrib/SqlMapperExtensions.cs#L63

mgravell avatar Jan 06 '22 11:01 mgravell

Sorry It's my fault. I haven't inform you about using contrib.

I have gone through the above link, It's doesn't have support for SAP Anywhere..

Thanks for your information. I am still searching for good ORM for SAP Anywhere Database.

sravangontla avatar Jan 10 '22 14:01 sravangontla