7
votes
1answer
108 views

Fluent Nhibernate, is the mapping correct?

I'm very new to NHibernate and DB. I have three tables which are connected with many to many relationship. Here are the tables creation Script: ...
2
votes
2answers
77 views

Simple Data Access Layer

I have DatabaseContext class. ...
10
votes
1answer
159 views

Password Manager UI: Populating DataGridView is Painfully Slow

I'm designing a small account/password manager using C# and SQL Server CE. LINQ to SQL is my ORM of choice. Here's the data model representing how the SQL Server CE database is set up: And here's ...
5
votes
1answer
265 views

Fastest image upload into SQL database

Hello I am trying to upload an image (screenshot from desktop) to SQL database as fast as possible. I would like to optimize my current procedure in terms of speed: ...
5
votes
2answers
167 views

Do I have any SQL leaks?

This is a Windows service that will run on about 600 machines. It is used to track the job server that a user is connected to (pushed through some kind of load balancer, not my area). I store this ...
3
votes
1answer
250 views

Populate Drop Down List from SQL Database

I am populating a drop down list from my SQL database. List should be able to be displayed with active only, inactive only or both at the same time. OfficeRepository.cs: ...
4
votes
1answer
408 views

Code First Entity Framework

Is the following good design for doing entity framework code first? What am I missing for a production system? I haven't included all my code, just a snapshot... My application, doesn't update the ...
2
votes
2answers
109 views

Returns Office Details from Database

I am building an Administration web site for the Office details in my database. Right now, I am just trying to display the office details. ...
5
votes
3answers
88 views
0
votes
1answer
30 views
3
votes
0answers
353 views

Compare Oracle Table with Sql Server Table and Update/Insert

Below is the current code wish used to update/insert records from Oracle view to Sql server table using Dapper. there is not field to check last record updated date in the oracle view so I have added ...
8
votes
2answers
227 views

Should a year and month be stored as separate fields or as a date?

We have a table with calculated data that groups sales by product, year and month, to provide fast querying for statistics. My colleague argues that the year and month should be two separate fields, ...
1
vote
2answers
240 views

Critique my database design and help me simplify my code

I wish to create a database for a webpage where users are able to add their own events to a timetable. Users will be able to decide if the events should be recurring (weekly) or not. Users should be ...
3
votes
3answers
139 views

How to make my code faster and easier?

This is my .cs part code where I am calling storeprocedure in LINQ to SQL: ...
4
votes
3answers
515 views

Speed up application and avoid SQL Timeouts

The code works just fine, but recently performace has taken a hit and it has SQL Timeouts far too often. I have it set up so I can run 50 different version of the application two for each different ...
1
vote
3answers
588 views

Using a Dedicated Class & Constructor to initialize Stored Procedure for SQL Transaction

I will try to be as concise as I can: The goal: trying to universalize a specific section of a project, that is dealing with the SQL database transactions. To assist you with your answer, I've ...
2
votes
1answer
2k views

Custom Paging in ASP.Net Web Application

I have following code for doing custom paging from an asp.net web application. Points of interest It uses Link Buttons as suggested in ...
2
votes
2answers
193 views

Injecting data into XML using a dll

This is a template for one of our data injection tokens. When I first looked at the template, it was worse than it is now. I would like some input on this because I think that it can be cleaned up ...
1
vote
1answer
84 views

Metadata query performance optimization

SQL Server 2008 R2 + .NET 4.5: I have the following metadata table: ...
2
votes
1answer
199 views

DAL Efficiency Help

I am attempting my first try at some c#. So far I love it, (not more than vb tho ;)) however, I am wondering if I can make these classes a bit more efficient. Please note ###Test is my attempts at ...
4
votes
1answer
354 views

Exporting PDF From Database back to PDF Format

Answer to Exporting PDF's from SQL Server DB and writing a Map to a Text File this was a Question that I asked in StackOverflow and then answered it when I was finished with the project. I would ...
2
votes
1answer
116 views
0
votes
0answers
341 views

Binding and iterating a database table to a List<T> in C#

I would like to iterate through the records of a database table using a C# List of my custom class. Is this the most performant way to handle this? (Simplified for ...
2
votes
1answer
277 views

Extract data from one column of SQL Server table

I have an SQL Server table from which I want to extract data from one column (DD) and return as multiple columns. The data is in ...
2
votes
3answers
4k views

How to improve performance in this database connection class?

This is my general database connection class. I am using this class to execute my queries through website. What would your suggestions about this to improve performance. Thank you. MSSQL 2008 R2 SP1 ...
3
votes
2answers
213 views

Simple DBLayer class review

I have created a simple DBLayer class. But I am not sure whether this class have any bug/issue using in production. ...
0
votes
1answer
325 views

Is this a good way to limit the occurrence of OutOfMemoryException?

I have a class that uses the SqlBulkCopy to bulk insert data into a SQL Server database. My original implementation just passed the m_buffer (which is a reference ...
1
vote
1answer
407 views

How to dump UCCX stored procedure results via c# to SQL Server

I am writing a simple-ish c# CLI app to improve our telephony reporting system. At present, I have a nightly DTS package which dumps a couple of tables from the Cisco telephony box into a database ...
2
votes
3answers
3k views

Search using stored procedure

I want to search a DB table and display the records in a gridview below is my stored proc ...