Skip to main content

All Questions

Tagged with
0 votes
2 answers
62 views

Why do I need to model a join table class?

I have two classes in C#: public class Student { public string Name {get; set;} public string Email {get; set;} public List<Course> Courses {get; set;} } public class Course { ...
Merlis's user avatar
  • 9
0 votes
0 answers
29 views

Error "To change the IDENTITY property of a column, the column needs to be dropped and recreated."

I'm a beginner and i am having this error when i use the update-data base, after the migration: "To change the IDENTITY property of a column, the column needs to be dropped and recreated." ...
Carolina Elias'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
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
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
-2 votes
1 answer
30 views

Error when takling a user input and seeing if it is in an Sql Database [closed]

I'm trying to develop a simple Clock-in/out system where the user inputs their details and it will check if they are in the database before proceeding with the next functions. this is the code i have ...
Oliver Hewson's user avatar
0 votes
1 answer
53 views

how to generate .bak file from my ips .net core project?

I have created a project using .NET core and now I want to generate a database .Bak file using, and I just don't know how or if it's even possible or not. I just want some other opinions and insights.
Kuala bear's user avatar
0 votes
1 answer
95 views

I got this error in my code. How should I clear this?

This is my code: public MyResponse InsertTeam(MyRow Row) { try { var connection = SqlConnections.NewByKey("Cred"); /* Getting Insert to LogBook table */ ...
Raja's user avatar
  • 1
0 votes
1 answer
51 views

EF 6 Update query and Where clause with list of integers comparison

In EF 6.0 I want to update some records based on a WHERE filter. Records which I recognize from a list of integers of ids. The problem is it sees the id list as an nvarchar "61, 62, 63" and ...
Mihai Socaciu's user avatar
0 votes
2 answers
465 views

Deletion and Archiving of old data in Microservice system

I am preparing to implement delete and archive the old data in the current system. More information about our system. Architecture: We apply Microservice architecture, Framework: .Net, and Database: ...
Khanh Tran's user avatar
0 votes
0 answers
152 views

Clear Tables in DB for unit Tests

I am using EFCore and xUnit for my unit tests. I've set up a DB with mock data. However, I want to check in a test if an insert in an empty DB also passes. For that I need to delete/truncate the db in ...
Patrick Cerny's user avatar
0 votes
1 answer
524 views

Get more than 1000 rows from a SQL Server SELECT statement

I want to select more than 1000 rows with a SELECT statement. There are about 2000 rows and I want them in one SELECT. But I only get 1000 rows. This is my code: string connection_sql = String.Concat(&...
Christian01's user avatar
-1 votes
1 answer
70 views

Cancel sale and remove from sale history

I have a post sale application using sql dbase, it is running fluently my issue with canceling sale and remove entry from sale history and database. the following code suppose to do that but it does ...
Agili's user avatar
  • 1
0 votes
2 answers
63 views

Separating SQL database record insertion and program logic

Suppose I have the following code: private class DataAccess { private static string connectionString = ConfigurationManager.ConnectionStrings["DatabaseServerInstance"]....
Aleksandar's user avatar
1 vote
1 answer
389 views

How Do I use C# System.Data.Common.DbBatch?

I feel like I'm missing something completely elementary here. How do I use the C# DbBatch class? I'm working on optimizing a client's SQL commands and they use both Oracle and SQL Server. This ...
Mr. Anderson's user avatar

15 30 50 per page
1
2 3 4 5
143