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

learn more… | top users | synonyms

1
vote
3answers
291 views

Table Design for Student Attendance hourly for each day

I have created a table (attendance_details) for storing every day attendance of Students in MySQL. Need to capture attendance for hourly (1-8hrs) every day. I have the student details in separate ...
0
votes
3answers
83 views

SSIS - Best way to insert large number of rows

So here's the scenario: I have an XML file, which is in size of 500GB, and with data of around 600 million rows (once on a database table). I'm using SSIS for the operation, and since it consumes a ...
2
votes
1answer
59 views

SQL Server : create dynamically queries to select all related data in DB based on entry table and ID

I'm tasked to create a SQL statement which will create (and run?) multiple other queries which will select all related data outgoing from an given ID (uniqueidentifier) and a given table name. It ...
0
votes
1answer
312 views

SSIS import with header record

I have fixed length text files that I have to import into SQL Server daily. These files contain header records (01) and Detail records (02). I am trying to build an SSIS package to do this. I have a ...
0
votes
0answers
15 views

Can we swap out SQL Server with HBase on our .Net application?

In a current application we use SQL Server. The data flow consists of using TVPs for better-than-bulk-insert performance by passing in DataTables. As part of the data addition process, old records ...
0
votes
0answers
21 views

Linq Query Optimization [closed]

Urgent,I am really in trouble. can anybody help me? my query is slow: I have created a view in sql server containing nested loops like this: Tis is my view: SELECT dbo.VE.V, dbo.VE.Operation, ...
3
votes
2answers
386 views

Best Practices for Creating and Deleting Records in MYSQL

I'm fairly new to working with databases, but I've currently have a webCrawler that I've written in C# using MYSQL database. The crawler is frequently writing and deleting records from the database ...
2
votes
1answer
30 views

Select columns dynamically from sql server table

Lets say I have a table that actually store record which looks like Create Table dbo.Info ( SN int primary key identity(1,1), FirstName nvarchar(50) not null, LastName nvarchar(50) not null, ...
0
votes
0answers
16 views

Passing DEFAULT value into new SqlParameter() [migrated]

How can i pass DEFAULT value into stored procedure in MVC4 .NET ? I have this code return Database.SqlQuery<Program>( "spGetProgram @p1,@p2,@p3,@p4", new ...
0
votes
1answer
17 views

Slow fill database

The source sends in my program a large number of rows. When the number of rows such as two thousand per minute for one table, all is saved in the database properly. But if you send two thousand per ...
5
votes
1answer
64 views

Can CLR execution continue after 'THROW' is encountered in T-SQL?

I am calling a T-SQL stored procedure from a CLR stored procedure. and the THROW statement in T-SQL stops the execution of CLR without going into the catch block. Is there something I can change in my ...
2
votes
2answers
41 views

CLR/C# equivalent to XACT_STATE()

I am porting a set of T-SQL stored procedures to C#/CLR. In the T-SQL, we use XACT_STATE() to determine if an error requires rolling back to a savepoint or rolling back the transaction entirely. I ...
3
votes
1answer
345 views

System.Data.Entity.Infrastructure.CommitFailedException: C# Multithreading & SQL Server 2012

We have a C# multi threaded (100 threads) program which reads the records from the DB and each thread picks up one record (one Entity Framework connection per thread) and update the a single DB table. ...
0
votes
2answers
33 views

Grant execute on xp_logevent to sa using sa user to do it

Running a SQL Server 2012 CLR stored procedure with this code: const string executeLog = "EXEC master..xp_logevent @errorNumber, @message, informational"; using (SqlCommand cmd = new ...
2
votes
0answers
25 views

MongoDB C# driver fails to reconnect after stepDown

I have an Elastic Beanstalk environment in AWS that constantly verifies the DB is accessible by querying the mongos for one document. We only speak to the DB routers and not to specific instances. ...
1
vote
1answer
57 views

Sync many client database to one central database

We have client application which can be installed on local machine where users can work offline and create projects in it. This application is already developed. Now we need to create Admin ...
0
votes
1answer
47 views

Log debug messages in a SQL CLR C# Stored Procedure

I have developed a SQL CLR stored procedure in C#, for SQL Server 2012. I want to log messages to SQL Server registers. On a normal stored procedure I use xp_logevent What can I use to log a message ...
0
votes
0answers
17 views

Passing DataTable using SqlBulkCopy

Should I convert the DataType of DataColumns in to pass DataTable using SqlBulkCopy? This are the fields in my sql server database
0
votes
1answer
28 views

Entity Framework: Automatic migration failed on huge DB

I am using EF 6.1.1, and DB has three million records and migration has to change the precision of a coulumn of type decimal. And the migration timeout window set to max value, CommandTimeout = ...
7
votes
3answers
743 views

How to insert a large amount of records to the database in a short time?

I have to insert a bunch of records(500,000) to the database at once, using the fastest way. I've tried inserting 1,700 records at once but it took twenty minutes!! I am using SQL-SERVER, and C#. ...
0
votes
0answers
12 views

Pat_ID Incrementing by 2 only after close

I am working on an internal project connecting my database to my application. I am using C# to write the program. I am still learning and this is more of a training tool than anything else. When the ...
1
vote
1answer
512 views

How to use HTTP Connection Manager in Script Component? (Not Script Task)

I'm trying to perform the same scenario as in the following link; Create a SSIS Script Component as a Data Source that uses a pre-existing HTTP Connection Manager to retreive a page with GET and emit ...
0
votes
3answers
3k views

SQL Server 2012 - Insufficient memory to continue the execution of the program. (mscorlib)

I have a sql file, which is up to 180 Mb. When I try to open and execute it on Microsoft SQL Server Managment Studio 2012, I am getting this error. . What do do ? I researched on Google. And there ...
4
votes
3answers
20k views

Login to SQL Server using Windows Authentication

I have an (.Net Console App) EXE which connects to various SQL databases using SQL server Authentication with appropriate credentials. Now there is change required in the EXE to use windows ...
1
vote
2answers
77 views

Naming The SSRS Report Name based on the Parameters Passed

I want to save my SSRS Report Based on the Parameters Passed. i.e. Am passing P1 And P2 as parameters so I want my SSRS Report name as P1_P2_ReportName.Xtension. Any suggestions?
1
vote
0answers
39 views

Statement succeeds, data missing [closed]

I have two reports from the same customer, where they claim that an error occurred that implies a SQL Statement didn't execute. These are very simple statements, setting a value in a single column. I ...
0
votes
1answer
87 views

Put Postgres query result in array

How can I put an sql query result in a string array with Postgres? I have some attributes in the column 'zone' of the table 'mytable' and I must put them all in a String[] areas; This is my first ...
0
votes
0answers
105 views

SQL Server pre-login handshake error

I am working on a system where sometimes request/sec increase up to 680. It's a .NET 4.0 web api. In normal situations when requests are fewer, everything is fine, but sometimes when the number goes ...
1
vote
2answers
185 views

Dropping person while their connection sleeping in SQL Server

I have a C# application that communicates with SQL Server. When I try to drop a user that recently had a connection with SQL Server, it gives me an error that I can't delete them because they have ...
3
votes
2answers
253 views

Searching multiple tables in SQL

This question will involve some C# code but I hope that is fine, in the end it is the SQL that is the issue. (To see short question look at end of post) So I have a site, where you can add a site in ...
0
votes
0answers
10 views

Find unpublished columns via RMO

The stored procedure sp_helpmergearticlecolumn will return all columns for a table and have a bit set if the column is published or not. The MergeArticle RMO object has the function ...
0
votes
1answer
176 views

MySQL Data Synchronisation from different Databases in C#

I am supposed to create a C# solution to compare the data (table, column and row) from two different databases and update the 2nd one as follows: 1. with just the rows that are updated recently ...
1
vote
2answers
322 views

How to re-declare T-SQL variables if it already exist?

Background: I'm building a SQL command to be executed on the server which involves a lot of accessing store procedure and declaring variables which are used as input to other stored procedures. This ...
2
votes
2answers
134 views

How to handle too many inserts?

I have a database that is accessed from remote locations in the world with very long delays and poor transfer speeds. I currently transfer the data using a transaction since either all or no data ...
3
votes
1answer
162 views

I can backup my SQL Server 2008 R2 but can't restore from the very same folder

I ran a backup into a folder. The Network Service has full control access to this folder. The backup process didn't work until I granted that account full control. I try to restore that same file but ...
2
votes
1answer
82 views

SSIS 2012: What rights are needed to connect to SSDB via DMO

I'm trying to connect to the SSDB catalog to execute a package using the .NET object model e.g. using Microsoft.SqlServer.Management.IntegrationServices; var sqlConn = new ...
3
votes
1answer
409 views

Are we required to handle Transaction in C# Code as well as in Store procedure

Do we really require transaction handling in c# as well database store process both side C# Using(transaction with transaction scope) { Execute store proc; Transaction. Complete; } SQL ...
0
votes
2answers
53 views

Searching a database safely using SELECT

I have a site that allows users to search the database for several items. However I am not that good with SQL and I have read that allowing user to type in boxes that then use "SELECT-statements" is ...
0
votes
1answer
97 views

SSIS append trailer with Script

I am trying to add a footer to a flat file output. I have 2 data flows in my control flow. One creates the file from the DB. It goes from OLE DB Source to Flat File Destination. The second control ...
0
votes
0answers
32 views

I want to make stored procedure for the TABLE1 that have another table2 column which is not primary key in sql server

I have two table Maker(maker_id(PK), maker_code, maker_desp) Model(model_id(PK), model_code, model_desp, maker_id(FK)) Now I have a gridview 2 in asp.net c# MAKER TABLE (GRIDVIEW 1): Maker_id, ...
1
vote
1answer
160 views

SQL Server Specific term full text search is not working

I'm trying to perform an specific term full-text search in SQL Server. It looks like the way to do it is by wrapping the keywords in double quotes, which I'm doing in my app: Query = "\"" + ...
0
votes
2answers
347 views

can we transfer sql database backup from one server to another server directly?

I want to transfer sql database from one server to another server directly, instead taking back up of that database and copy that back up in another server and then restore it. Please tell me, Is ...
1
vote
4answers
151 views

Pros and cons of a particular DB design approach for single vs multiple tables

I just got a new project (in JAVA) where I am thinking of all the pros and cons of a particular DB design approach. Some pointers: Our app has many "content" entities like News, Blogs, CMS pages, ...
3
votes
3answers
6k views

Trying to connect to PostgreSQL with Entity Framework via Npgsql and C#

So, I'm new to databases and only have done a little with PostgreSQL before. I have C# (visual studio 2012) and have downloaded the Entity framework (6). I have also downloaded the latest Npgsql data ...
0
votes
2answers
31 views

Report individual changes to data

I need to produce a daily extract on the individual changes to a dataset. So, there are 14 tables containing product and customer information and the extract must only show records from each table ...
4
votes
1answer
756 views

InnoDB inserts 100 times slower than SQL Server inserts

I have a simple table with two columns: id (autonumber) and name (char(255). When I use C# to insert 100 records in a loop it takes about 30 milliseconds per insert. This is way too slow. So I ...
0
votes
1answer
222 views

Insert values in table from front-end CategoryId

I want to add a value from front end into a table. I want to do it in asp.net. I have a table which is as below:- CategoryId int CategoryName nvarchar(50) not null ParentId ...
1
vote
2answers
269 views

script task sssis file extension is missing?

Hi I have problem with script task C# I create I have to prefix log file with date but my problem is not adding file extension log file is log_yyyy_MM_dd without extension I want ti extension log ...
0
votes
0answers
146 views

Is it possible to restore only tables/constraints from database backup?

For circumstances beyond my control (permissions/bureaucracy), I'm unable to use SSIS or Scheduler Agent to create an automated, scheduled production database backup and development database restore. ...
1
vote
1answer
223 views

Finding parameter names for binding stored procedure parameters

For unit testing purposes I am attempting to call the DBMS_OUTPUT.PUT_LINE procedure from c# using parameters that are bound by name. Since this DBMS_OUTPUT package seems to be a standard on Oracle ...