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

learn more… | top users | synonyms

1
vote
1answer
619 views

Merge Replication from SQL 2008 R2 to SQL 2005 Express: SQL Server version (10.50) is not supported

I'm setting up a (one way) pull, RMO merge replication via web sync from my main database (SQL Server 2008 R2) and clients running SQL Server 2005 Express or 2008 Express (I must support both). I've ...
5
votes
3answers
2k views

3rd party dll in SQL Server CLR

I need to use a third party DLL in a trigger c# code in SQL Server CLR But when I try to add reference it just shows some DLLs from SQL Server. How can I add my third party dll to SQL Server?
4
votes
3answers
5k 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 ...
5
votes
1answer
483 views

Deadlocks in SQL Server

We're currently encountering a problem with out ASP.NET Application that results in deadlocks on the SQL Server database. A bit of background information I can provide is that we rely heavy on AJAX ...
1
vote
2answers
2k views

Installing SQL Server Express instance so common users can access

I need to install a SQL Server Express instance (as an admin) which can be later on read and modified by regular users. I run into http://msdn.microsoft.com/en-us/library/ms254504.aspx, and I'm ...
2
votes
2answers
729 views

Trace unclosed connections

I get timeout errors every couple of days or so between IIS7 and an SQL 2008 Server. The error message I get is: System.InvalidOperationException: Timeout expired. The timeout period elapsed prior to ...
2
votes
2answers
542 views

Restoring database always throwing exception

I am trying to restore some database backup file into the same database. The .bak file is creating problem always. When I select the .bak file from a network drive like "\\TestPC\ShareFolder\test.bak" ...
7
votes
2answers
1k views

how will nvarchar(max) store data in database will it be fast if some data is less then 4000 characters?

I have to develop a CMS which will support two Language English, Arabic. This CMS will be a sort of Article Publishing site. While designing & analysis i found that some articles are more than ...
1
vote
3answers
993 views

Local user login access in sql server 2008

I have a created a local user called 'MynetDB' with SQL Server Authentication (password) in SQL server 2008. Server roles is public and user mapping to 2 databases as db_owner and public. Status has ...
1
vote
3answers
433 views

What's the solution for corrupted MDF files?

We are working on an MDF file that has been corrupted, because a virus deleted 2 MB from the header of the file. We also have another backup of this MDF File from 3 months ago. Both MDF files have ...
1
vote
0answers
389 views

Can the service-broker cause SQL Server to crash when using SQLDependency

I have C# application that uses SQLDependency to get updates from a message table. I have tested it quite extensively and worked great in the development environment but when I ran it on the ...
5
votes
1answer
320 views

Design for file based with many events

I'm not a database guy but I need to design a database to store events for our application. Our client app connects to remote hardware and syncs count data. The count data are csv files split into ...
1
vote
2answers
326 views

Designing a database tables for the following scenario

I just got following entities Employee, Client and Company. Where Employee and Client have one to many relationship with Company ie A single employee may be mapped to attend to many companies and ...
1
vote
1answer
466 views

CLR TVF that calls web service is getting 401error

I am calling a web service from a CLR TVF in SQLServer 2008R2. On the IIS server this service has open permissions. When tested using GET or POST requests on a browser the web service works as ...
3
votes
1answer
378 views

Why does DataContext.SubmitChanges() Exist?

I'm not sure if this goes here or on Stack Overflow, but I figure someone here might know it. Why did the developers of LINQ decide that not only do you need ctx.InsertOnSubmit(item); but you also ...
3
votes
2answers
2k views

How to import a varbinary(max) column with bulk import?

I have a varbinary(max) column that I need to bulk import. The data I'm putting into this column is a byte[] in C#. How do I format the data in the comma-delimited file used for bulk import? In ...
14
votes
3answers
288 views

How can I guarantee that inserts to SQL Server 2008 R2 are cached in RAM first?

Imagine a stream of data that is "bursty", i.e. it could have 10,000 events arrive very quickly, followed by nothing for a minute. Your expert advice: How can I write the C# insert code for SQL ...