Skip to main content

All Questions

Tagged with
0 votes
2 answers
82 views

Bulk Insert not respecting Id column with Linq2Db and Entity Framework Core

I am using LINQ to DB with the linq2db.EntityFrameworkCore for bulk-entering of some records. With EF, I just save the records with a 0 in the Id property and they use the sequence I set up on the ...
Killnine's user avatar
  • 5,790
-1 votes
1 answer
106 views

How to correctly pass nvarchar parameter to SQL Stored Procedure from .NET Application?

I would like to execute a SQL stored procedure (SP) with parameters. However, I am having difficulties passing nvarchar (string) parameter called "office" to the SP. If I want to execute the ...
user2018's user avatar
  • 348
0 votes
0 answers
61 views

Retrieving OUTPUT values from a table variable using Dapper

I have a SQL Proc which uses a MERGE statement to INSERT when not matched and the OUTPUT values are stored in a table variable INSERT ( [Code], [...
Auroops's user avatar
  • 33
0 votes
0 answers
57 views

Convert C# DateTime.Ticks to Bigquery DateTime Format

I have a column in my Bigquery table that is filled by C# Ticks: DateUtc = DateTime.UtcNow.Ticks; This is something like: 638148714773184690 I want to convert it to Bigquery DateTime.
Keyvan's user avatar
  • 21
-1 votes
2 answers
112 views

Query (or LINQ in Entity Framework) for getting user's rank

I have a SQL Server database with a table named Users. This table has 2 columns: XP (int32) and Name (nvarchar). I need a SQL query or Linq (this is better because I'm using Entity Framework in C#) ...
Yasim Yasin's user avatar
0 votes
0 answers
33 views

switch from current encoding to specified encoding is not supported

enter image description here import.sql(((( `` use `[D:\DBSD.CW2.14714.13786.12928\DBSD.CW2.14714.13786.12928\DBSD.CW2.14714.13786.12928\APPDATA\CAMBRIDGE.MDF] --generating sample XML select top 2 ...
Mashrab Ochilov's user avatar
0 votes
1 answer
69 views

Iterating over C# List and execute a SELECT statement in the database for each element - more efficient way?

I have an SQL query exactly as described in this post. To sum it up, it will read all Carboards specified with an offset. This query is executed on a MariaDB database. Now, I have my Cardboards (ID, ...
philipp8230's user avatar
0 votes
1 answer
110 views

Syntax error in FROM clause C# and MSAccess

I have a program that fetch data from database. I have two different databases (MSAccess and Oracle). I kept receiving "Syntax error in FROM clause" if I set the connection to MSAccess but ...
JerryW's user avatar
  • 43
0 votes
0 answers
49 views

Is There a Better Way to Count the Number of Columns in an Access Database Table?

I need to count the number of columns in a Table in an Access Database. The following code does the job, but I wonder if there is a better way using INFORMATION_SCHEMA.COLUMNS ? CmdStr = $"...
Tony H's user avatar
  • 101
0 votes
2 answers
58 views

How Count Number of Records Returned by a SQL Query Using OleDb

Is there an easy way to find the Number of Records returned by a call to the Microsoft OleDbDataReader, reading from an Access Database (JetEngine)? I want to find the number of different "Teams&...
Tony H's user avatar
  • 101
0 votes
0 answers
38 views

OracleCommand parameters not being converted in C# [duplicate]

I'm trying to setup an OracleConnection in .net which has been successfully working until I tried to add parameters via the OracleCommand. I get the error 'ORA-00903: invalid table name' which is ...
user37213's user avatar
1 vote
0 answers
65 views

Table Design for Calculating Median Over User-Defined Period from Pre-Processed Data

I’m working with a table that contains pre-processed data from several other tables. This data is segmented by a time period (like a day) to speed up queries that could take minutes if I had to ...
Gustavo's user avatar
  • 21
0 votes
0 answers
46 views

Is there a way to return data from a database call as an general object rather than a specified type, without creating a new class

I have a function that is trying to return a list of all transactions from the database. To do this it needs to retrieve all the data from TransactionItems, and then join that to the data retrieved ...
Luke 135's user avatar
0 votes
0 answers
84 views

Why is bulk reading from a Postgres DB in C# taking so long?

I am performing a bulk read on a Postgres DB in C#. I am not a database expert by any means, so I suspect I am doing something obviously wrong in my code. I have attempted 2 methods, and both are ...
ziggy's user avatar
  • 21
0 votes
1 answer
204 views

DB2 SQL0104N An unexpected token "?" was found following ""

I am trying to run a db2 sql statement using the oledb command function in c#. Actually i am running another sql queries at the same way but I am getting following error when executing this query. [...
alinz's user avatar
  • 81

15 30 50 per page