Skip to content
Advertisement

Tag: .net

Polly retry policy with sql holding transaction open

I am using Polly to implement a retry policy for transient SQL errors. The issue is I need to wrap my db calls up in a transaction (because if any one fails, I want to rollback). This was easy before I implemented retry from Polly because I would just catch the exception and rollback. However, I am now using the

‘Procedure Has Too Many Arguments’ Error Although I Have Only Two

I checked the other posts related to this problem but could not find any answers. I have a post action method for my hotel api and in the Hotel Repository I have this CreateHotel method below. I just enter two arguments and there’s two arguments in the stored procedure too but I get this error: System.Data.SqlClient.SqlException (0x80131904): Procedure or function

Issues with Dapper query syntax

little assistance here with my query using dapper, been getting error Message = “ORA-00936: missing expressionn” on my query. I would like to know what am I missing here? Answer Firstly with Oracle queries you need to use : instead of @ to denote a parameter placeholder. Then secondly this code: will produce an object with a property called RouteId.

Unexpected token when creating a string expression?

I have the following code: There is an error here ‘{cardId And it tells me Invalid Expression term ” Answer You need to be aware that this kind of string concatenation is avoided and it is open to SQL Injection attack, you should always use parameterized queries to avoid SQL Injection and also to get rid of errors, something like

F# Query Exception, “unrecognized method call value”

Q: What does the following exception mean? I’m attempting to translate a Pervasive SQL query to an F# query using SqlDataProvider with an ODBC connection, building up slowly bit by bit. I’m getting an exception with the following query with a somewhat cryptic exception. When the printfn statement is executed and the expression is actually evaluated, the exception is hit:

Advertisement