Questions tagged [c#]

C# is a general-purpose, managed, garbage-collected, object-oriented programming language created by Microsoft.

Filter by
Sorted by
Tagged with
0 votes
1 answer
7 views

Does the BigQuery API offer a way to retrieve info on scheduled queries?

Using the BigQuery C# API, I can retrieve a list of job IDs: BigQueryClient _client = BigQueryClient.Create(...); ... foreach (var page in _client.ListJobs(projectId).AsRawResponses()) if (page....
Jon of All Trades's user avatar
3 votes
2 answers
401 views

In SQL Server Temporal Tables start/end date timestamps are identical for rows that are created inside a EF Core transaction

I'm using a EF Core DbContext transaction to create/update entities on a SQL Server temporal table. The data I'm processing (array of items) has a key (Year-Sequential, like: 2023-001, 2023-002, etc.) ...
Cheshire Cat's user avatar
0 votes
0 answers
37 views

Hidden Windows registry entry when trying to patch SQLLocalDb anomaly

This question follows one asked and answered here : Can't connect to SQL Server 2017 Local DB shared instance I have a .Net Framework / C# project where a SQLLocalDB instance is created by a ...
FrançoisR's user avatar
0 votes
1 answer
67 views

Which two threads are handling which table and how to solve this?

I'm working on a multithreaded application (VB.Net/C#), who is working on an SQL-server database. Regularly, my customer is complaining that the application show "deadlock"-like exceptions ...
Dominique's user avatar
  • 523
2 votes
2 answers
168 views

Create a separate table or store the data in a string?

I'm building a simple job board (using MS SQL/ASP.NET core/C#) and have a question about the database design. I don't know how to decide whether I should create a separate table or not in certain ...
Papyrus's user avatar
  • 23
0 votes
0 answers
632 views

Wrong number or types of arguments in call to procedure

I am getting Below error message in the catch exception: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'WS_GET_WEB_TREE_NODES' ORA-06550: line 1, column 7: PL/...
Julia Kurakula's user avatar
-4 votes
1 answer
122 views

How to improve Database Slow perfomance in SQL server [closed]

Please I need help optimizing my database performance. I have done some profiling to see seek queries using BlitzCache script created by Brent Ozar. After executing the script, some number of queries ...
Keembest's user avatar
0 votes
1 answer
315 views

Looking for file-based DB engine alternative to MS Access

My company has been chained to this MS Access '97 .MDB format we've had since the dawn of time. Our schema is hierarchical, with multiple one-to-many relationships. We are at a point where we are ...
Kate M's user avatar
  • 3
1 vote
1 answer
427 views

SQLite database Upgrade Schema without loosing data

I have a small C# Windows Forms application. It uses SQLite DB on the client's PC. I started with a Schema DB and with time I added more tables and columns to my local DB (not the client's). I want to ...
Guillermo's user avatar
1 vote
1 answer
197 views

Update column with variable

Employee table ID EmployeeSRN Name SupervisorID 1 10101 Akash 2 2 10111 Smeeta 4 3 10201 samir 5 I want to update SupervisorID of Akash to Samir's ID, i.e. 3. In my C# function, the only ...
Akash's user avatar
  • 11
0 votes
2 answers
140 views

User handling in MS-SQL database

I have an MS-SQL installation, controlling different databases. This can be accessed using Microsoft SQL Server Management Studio 18. For doing that, I use Windows authentication. In there, I have ...
Dominique's user avatar
  • 523
1 vote
1 answer
447 views

Does SQL Server 2019 automatically un-compress data when it is queried by an application? [duplicate]

We are using SQL Server Express 2019 and have inevitably ran into the 15GB cap. I now have to figure out a way to quickly compress data since we cannot buy a license at the moment. At the moment it is ...
Ivan Snyman's user avatar
0 votes
1 answer
99 views

Having issues for calling a sp multiple times per second async? [closed]

Here is my scenario, I have a windows service that monitors queues of data for messages. If this services finds a message on the queue it will grab it, do a little work then send it to a wcf ...
Terrance Jackson's user avatar
0 votes
0 answers
92 views

I need to store large amounts of data in terms of time and source as dimensions. How should I design my database?

My project needs to save a large amount of historical data from sensors, and the number of them is large. Although we have eliminated part of the data by the anti-jitter and anti-duplication, but ...
Mr. Squirrel.Downy's user avatar
0 votes
0 answers
57 views

How to do archiving in a Winforms C# Project with MySQL database?

So I have a C# Winforms Project with MySQL as the backend. I'm wondering how to do archiving on my records. Is it done by inserting records from the active table to an archive table and deleting the ...
June's user avatar
  • 1
2 votes
1 answer
228 views

Executing sql linked server procedures through python

I am getting an error when trying to execute SQL Server system procedures such as sp_addLinkedServer and sp_dropserver etc from python script USE [master] EXEC master.dbo.sp_dropserver @...
Asma's user avatar
  • 21
0 votes
1 answer
123 views

'You cannot add or change a record because a related record is required in table 'Booking'.' error when removing a PKFK value in a SQL database in C#

System.Data.OleDb.OleDbException: 'You cannot add or change a record because a related record is required in table 'Booking'.' My sub-routine to get rid of the booking with a given BookingID in the ...
JJs.Graphics's user avatar
0 votes
1 answer
2k views

Exception when calling Postgresql function returning a local numeric from C#

I wrote a Postgresql function to insert a row and return the value generated from the identity column. I receive the following exception when trying to call it from C#. Npgsql.PostgresException: '...
TheCodeFiend's user avatar
2 votes
2 answers
2k views

SMO : The login already has an account under a different user name, when calling TransferData()

I need to implement the following requirement. I have setup a remote sql server express, certain users shall be able to create databases on remote server and assign other users to have access on it (...
Elena2020's user avatar
-1 votes
1 answer
419 views

Is there any possibility to use SMO objects to copy a database from MS SQL Server 2014 Express (server address) to localhost?

I need to implement in c# a functionality for copying a certain database from server address to localhost (I'm aware of the backup/restore option - I have this implemented when I want to export and ...
Elena2020's user avatar
0 votes
2 answers
444 views

Update via C# EF Core or SQL

Our work involves updating products, we have a large table of products, and the prices and other pertinent information gets updated hourly. Let’s say it’s an amazon store, and we are talking of amazon ...
user3150255's user avatar
1 vote
1 answer
452 views

how to scaffold the database triggers [closed]

I'm trying to find a way to include table triggers when reverse-engineering the database. but I can't seem to find a way to do it. I'm using SQLserver and .netCore 3.1 with efcore. and each time I ...
Ataa Aub's user avatar
-1 votes
1 answer
74 views

Long Running Query Optimization

I need to optimize this query as this query is taking minutes of time in execution. Below is the query. i'm giving date parameters and shift id is optional. as query is returning same in and out from ...
Zeeshan Malik's user avatar
6 votes
1 answer
698 views

How to return several arrays of doubles as a table in C# SQLCLR function

What I have is a CLR SqlFunction that produces 3 arrays of doubles. I would like this function to return something appropriate so that the FillRowMethod can output it for me as a table in T-SQL. It ...
Oscar's user avatar
  • 249
0 votes
5 answers
79 views

How to write search query to retrevie the rows with biggest DateTime <= 2010102248 in SQL

I am creating a table and now trying to create my first Search Query. I have created the table successfully like this: CREATE TABLE testTable ( DateTime INT NOT NULL, /*yyyyddhhmm, ...
coding's user avatar
  • 35
0 votes
1 answer
57 views

Conditional multi table insert

My application parses a web resource for data constantly. The data is then used to build a domain object. The domain object is represented in my database across several tables. The domain object is ...
cubesnyc's user avatar
  • 113
0 votes
1 answer
359 views

First-In and Last-Out times for Night Shift and Day Shift Employees

Kindly share suitable technique to handle night shift as well as day shift. Below are the shifts, Night, 2020-07-20 17:00 to 2020-07-21 02:00 Night, 2020-07-20 17:00 to 2020-07-21 02:00 Day, 2020-...
Zeeshan Malik's user avatar
1 vote
1 answer
509 views

Upserting 50K records into big table (app. 350 columns) in postgresql

Using C# I'm trying to upsert from csv file (~ 55000 records) to a postgresql table with 350 columns. I'm just building the upsert statements from header and record which are comma separated. Like ...
alaa_sayegh's user avatar
0 votes
0 answers
361 views

Sql service broker and SqlDependency

I have a system where my TCP/IP command prompt application receive data and insert that data in [database1].[mytable]. Now I want to move that data from [database1].[mytable] to [database2].[...
deepak's user avatar
  • 101
2 votes
0 answers
43 views

Modeling Device Relationships

At currently I am designing an inventory system for internal use and I have come across an interesting scenario when adding tables for creating the devices. Currently I have tables for Device, ...
kabuto178's user avatar
  • 349
0 votes
1 answer
24 views

i have error in query [closed]

i am not getting what is the issue in the query probably i am not following the correct way to put the string and char sign , i am inserting the data in c# to local host with where clause please check ...
Ahmad Ali's user avatar
0 votes
1 answer
136 views

Login failed for newly created user

I just created my first database yesterday. It is now set up and I can write to it from my C# application using the admin user login. I would now like to use a limited write only user so my admin ...
OsakaRhymes's user avatar
5 votes
1 answer
678 views

System.Web in SQL Server CLR Function

I have done some light research into this topic and I would like to know what are all the pro's and con's or enabling/registering this particular .dll within SQL Server? Back information - we are ...
Doug Coats's user avatar
2 votes
1 answer
746 views

Should I move ORDER BY to app?

I noticed this discussion on NOT using ORDER BY in SQL query unless really necessary. https://www.brentozar.com/archive/2019/10/how-to-think-like-the-sql-server-engine-adding-an-order-by/amp/ The ...
ManInMoon's user avatar
  • 345
1 vote
0 answers
1k views

What would be an appropiate BatchSize for bulk insert 34 GB of data (JSON files) into SQL Azure?

I got like 25,000 JSON files whose size (in average) is 1.2 MB (also, the average of records per JSON is 5,000), and the total size is like 34 GB. I have been reviewed the BCP utility from SQL Server, ...
curiousguy_08's user avatar
0 votes
1 answer
1k views

Efficiently get first 10 results and total number of results

For a search page, I need the first 10 results and the total number of results of a query. That part is easy: SELECT TOP(10) ... FROM ... WHERE ... ORDER BY ... SELECT COUNT(*) FROM ... WHERE ... ...
leuk98743's user avatar
0 votes
1 answer
870 views

End of file reached. Error 38 in SQL. Passes verification checks

Having issues restoring a database in SSMS, error 38. The databases are transferred up to google via their Drive API. Download it on my side and has error. If I transfer it through teamviewer ...
Austen Swanson's user avatar
1 vote
1 answer
1k views

Facing permission error while trying to execute a stored procedure published through CLR

I've created a stored procedure using SQL CLR c# stored procedure in Visual Studio 2017 and I've published it in MSSQL Server. Now I can see my stored procedure, but I face this error when I want to ...
Pantea's user avatar
  • 1,402
1 vote
1 answer
574 views

This failure occured while attempting to connect to the Principle server

One of our clients recently came to us with a problem he's facing while working with our application. The error in the log file is the next: System.Data.SqlClient.SqlException (0x80131904): Timeout ...
Paul Karam's user avatar
-2 votes
1 answer
684 views

How to group by linq based on input parameter? [closed]

I want to use group by in C#, and my result must be like this code in SQL: SELECT MAX(EffectiveDate) AS EffectiveDate,details.PersonnelBaseID FROM dbo.tkp_PersonnelDetails AS details where details....
mhd.cs's user avatar
  • 99
0 votes
1 answer
103 views

Use table in database like in excel [closed]

I'm writing a program for my client in C# Winform. And the client gave this excel sheet. Process I have a table that used to calculate BULK amount of alcohol by "DIP" and "SLIDE". In excel I need ...
inD4MNL4T0R's user avatar
0 votes
0 answers
228 views

Configure MSLocalDB in a .NET config file

I have created a .NET Standard C# project and a SQL database in my LocalDB server (LocalDb)\MSSQLLocalDB. I have tried to configure the connection string in the project web configuration file but in ...
pncsoares's user avatar
0 votes
1 answer
89 views

How do you combine the input of three parameters into one?

I'm working on a query that will run via C# to SQL server. I'm trying to make the query flexible and provide parameters for all the inputs. Here is the query: SELECT Test_Matrix.tblTestMatrix....
jrdnoland's user avatar
0 votes
0 answers
2k views

How can I figure out the root cause of "Out of range value for column" error in MySQL

I have a console app written with C# on the top of .Net Core 2.2 framework with EntityFrameworkCore as ORM. My application runs various tasks that run every 15 minutes. Each task calls an external API ...
Junior's user avatar
  • 101
0 votes
0 answers
469 views

Database design for multilingual tags

I'm looking for a simple database design for tags, where the tag-label can be translated (multilingual). I'm currently looking at Toxi, which is a very simple and clean way of creating a tagging ...
juFo's user avatar
  • 279
2 votes
1 answer
489 views

Bind dll in SQL Server

I have a little side project at my work. My task is to deploy some SQLCLR code into our dev-database (SQL Server 2017) to test it. If the tests are successfull, we want to develop triggers and ...
CodingWookiee's user avatar
0 votes
1 answer
861 views

Conditional insert vs UNIQUE constraint

https://stackoverflow.com/questions/4069718/postgres-insert-if-does-not-exist-already I would like to check if something exists before inserting it, what should I rely on? UNIQUE constraint or ...
Konrad's user avatar
  • 209
3 votes
1 answer
2k views

Error publishing SQLCLR C# Function using Visual Studio 2017

I'm trying to (learn) publish a SQLCLR function using Visual Studio 2017. (It's a simple function that sends an email.) As a reference I used this articles on CodeProject and MSSQLTips: Create, Run, ...
McNets's user avatar
  • 23.5k
-2 votes
1 answer
131 views

How Can i Parse the sms text to textboxes [closed]

how can can i do this ? i can't get the return value and i can understand how regex work . string value = "+CMT:"+639231568462"," ","18/10/07,14:31:32+32" HELLO" "; Regex r = new Regex(""); ...
zarx burger's user avatar
0 votes
1 answer
1k views

Check if master is up from slave server(replication) postgresql

I want to check whether my master server is up by querying from slave server ? Is there any view or command ?
vyshu Ysh's user avatar

1
2 3 4 5