Skip to content
Advertisement

Tag: async-await

Parameter returning not in the correct format

I have an async task method that queries a database table for the total amount of Credits in a specific column. I have a string parameter in the method that I use for the query to identify which user is logged in, which is stored in Properties.Settings.Default.Student_Number;. The column for the student number in the database is a varchar and

What is the proper way of selecting multiple scalars within the same “using” statement with Dapper?

I have wrote the following method, which I hoped to make the method run faster by executing the tasks in parallel: Unfortunately, I receive the following exception: System.InvalidOperationException: ‘BeginExecuteReader requires an open and available Connection. The connection’s current state is connecting.’ How should I implement it correctly? Answer First things first, executing many commands in parallel against a database will

How to run SQL query with inside a javascript loop(map)?

what I’m trying to do is: loop through array of objects using map function run multiple SQL queries according to object append result of queries with object I’m looping through offers which is array of object.I get free_item and buy_item which are associated with offer.I am using knexjs for postgresql database with nodejs Here’s actual code: The Problem is it

Advertisement