Skip to main content

All Questions

Tagged with
0 votes
0 answers
55 views

Updating Database from DataSet with multiple tables

I have an application with an editor of multiple DataTables, that are stored in a DataSet which I load through a DataAdapter. My objective is to update the database with all the changes in all of the ...
Sambu's user avatar
  • 1
0 votes
2 answers
44 views

Oracle parameterized query for explain plan in C#

I have an explain plan query and I need to call with parameters in my .Net application. When I try it as following it gives me ORA-1780 Error. I have many parameterized queries in my application but ...
alinz's user avatar
  • 81
0 votes
1 answer
75 views

How to ignore trailing whitespace? [duplicate]

Say a SQL table contains a column of char(10), and a record contains the value "ABC" in that column. Entity Framework will pass ABC ("ABC" with 7 trailing spaces) when asked ...
Josh Brunton's user avatar
-2 votes
2 answers
101 views

Get particular value from string in SQL query

I am working with a stored procedure where I am getting a string with different characters I want to get a value at last index [AV] Z_Prem_454-3000_XXXXX_800+ [InstalmentScheme 6] above is the string ...
Pratex's user avatar
  • 115
1 vote
2 answers
62 views

Read a SQL-DOUBLE column as raw

I have data defined as double saved in a PSQL-Database (Actian) and I'm using DbDataReader to read the values. I know I can use GetDouble to read the value, but I would like read the raw value into a ...
Nicholas Kellner's user avatar
1 vote
1 answer
198 views

Converting System.String to System.Guid

I'm currently having a bit of a problem trying to convert a string with guid behaviour inside my database to convert to an actual Guid in my application. I have tried a lot of things, which currently ...
Rowin's user avatar
  • 161
0 votes
1 answer
42 views

nullreferenceexception from ExecuteScalar()

I really don't know what to write here. I was just coding and this stuff happened. connection.Open(); SqlCommand cmd = connection.CreateCommand(); cmd.CommandText = "select count(*) from ...
Unseens's user avatar
0 votes
1 answer
33 views

Transaction Log for database is full because update file about 100mb

I try to insert the data of a file about 100mb in size by splitting it into parts, each about 65,000 characters into the sql server. The first time I insert it and the next time I update that data. ...
Farley's user avatar
  • 1
1 vote
1 answer
70 views

PostgreSQL query returning different results in DbEaver and C# (Dapper/ADO.NET) despite same server connection

It's currently 1:15 AM on April 23rd, 2024. My timezone is GMT +7. I have a C# application and a DbEaver application both connecting to the same PostgreSQL server. I execute a very simple query as ...
Minh Giang's user avatar
-2 votes
1 answer
84 views

How do I convert this Knuth hash code in C# to the SQL equivalent?

Can anyone help me to convert the C# code below (Knuth hash) to the SQL equivalent? /// <summary> /// https://stackoverflow.com/a/9545731 /// </summary> static string CalculateHash(string ...
dezzy's user avatar
  • 485
1 vote
1 answer
243 views

Dapper how to pass object with list of objects into stored procedure

I have a problem with executing an existing stored procedure using Dapper. The stored procedure takes some parameters and list of user-defined type object. I mimicked the required parameters in C#, ...
Jivopis's user avatar
  • 540
0 votes
1 answer
66 views

Is there a way to enforce a specific JSON structure for JSON column?

I have a column in my table that will hold JSON objects. I currently have the column defined as MY_JSON_COLUMN NVARCHAR(MAX) Is there a way to make sure the JSON adheres to a specific structure? For ...
henhen's user avatar
  • 1,153
0 votes
2 answers
46 views

sql difficulties counting one column and getting the oldest id with the same content

I'm making a school project in mvc .net core, where people should be able to send in a request for help and it will show on a screen, my difficulties comes with the part that other people should be ...
Tjabo's user avatar
  • 9
1 vote
1 answer
59 views

Using FromSql or FromSqlInterpolated

According to this documentation (https://www.learnentityframeworkcore.com/raw-sql/from-sql) you should do this: string value = "value"; _dbContext.Set<T>().FromSqlInterpolated($"...
user7849697's user avatar
0 votes
0 answers
133 views

using ajax with asp.net core mvc .NET 8 in visual studio 2022

I have a view that shows information from a sql tabel that I inserted in to a local DataTable I want to create a button that filters what is shown with ajax this is the loop where the information from ...
Lelle's user avatar
  • 1

15 30 50 per page