MS SQL How to field add auto increment dependent on another field

For example, there is a table int type int number int value How to make that when inserting a value into a table indexing started from 1 for different types. type 1 => number 1,2,3… type 2 => number 1,2,3… That is, it will look like this. type number value 1 1 – 1 2… Read More MS SQL How to field add auto increment dependent on another field

How to handle "The given header was not found" when paging records in c# API GET request?

I’m requesting data from an API that requires paging records based on a custom header called "cursor". Only 100 records may be retrieved per call and as such I’ve created a while loop to execute. The loop functions… until it doesn’t. Once all records are paged, the headers get dropped and my program errors out… Read More How to handle "The given header was not found" when paging records in c# API GET request?

How to execute a piece of code for each element of the result of a dynamic query in PostgreSQL?

I have a dynamic query in my PostgreSQL function: execute format(‘select something from %’, table_name) I want to run some code for every record returned by the above statement. How can I do this? My first idea is as follows. I need to do something like this: execute format(‘select something from %’, table_name) into my_data;… Read More How to execute a piece of code for each element of the result of a dynamic query in PostgreSQL?

How to activate/force Basic Auth on THTTPClient

I can’t find an option to activate Basic Auth on THTTPClient. My main "issue" is that the first request response with a HTTP/1.1 401 Unauthorized and it triggers an auth event. I want to do it on the first "try". Here is my code: uses System.Net.HTTPClient, System.Net.URLClient, System.NetEncoding; procedure DoRequest(const url, username, password, filename: string);… Read More How to activate/force Basic Auth on THTTPClient