Tag: .net

Entity Framework 5 wrong data type in query

We are using EF 5.0 as our ORM of choice in our business solution, structured in a n-layer fashion with everything decoupled and a nice composition root with ninject. Lately, we’ve been building a database that uses partitioning underneath, and we have some important indexes on DATE columns. The columns are correctly declared on Sql […]

asp.net application, sql server & web services

I have no experience on connecting web apps to a SQL server on a different machine through web services. Are there standard web services that are supposed to be used? Also, why wouldn’t it be possible to connect to the SQL server on a “normal” way? EDIT: basically, I’m working on a new web application […]

Stopping .NET app's SQL Server DB being modifiable via Access using ODBC?

We have a .NET 2.0 winforms app that connects to a SQL Server 2005 database using Windows Authentication. All the database modifications are done using stored procedures which are called from the app. This works fine and users are only permitted to do things that their role permits. However, it has occurred to us that […]

using Enum in database and .net

this is how I declare enums: Enum GROUP_TYPE { TYPE1, TYPE2 } this is how I store them: GroupTypes(id, code) //code is the enum value name Groups(id, groupName, groupTypeId) In the InsertGroup stored procedure (I am using stored procedures) I receive @type_code as nvarchar and use it to find the correct id of the group […]

c# sql server backup percent read

sql command BACKUP DATABASE [databasesample] TO DISK = N’D:\kkk\test.bat’ WITH INIT , NOUNLOAD , NAME = N’name test’, NOSKIP , STATS = 5, DESCRIPTION = N’test’, NOFORMAT result 5 percent processed. 10 percent processed. 15 percent processed. 20 percent processed. 25 percent processed. 30 percent processed. 35 percent processed. 40 percent processed. 45 percent processed. […]

Is there a way to programmatically convert a SQL Server query plan to an image?

I’d like to be able to convert SQL Server query plans from XML to images. Ideally a vector format, but a bitmap would do. Is there an open source library to do this? Or can I use one of the SQL Server Management Studio DLLs? Thanks.

SqlBulkCopy with different collations

I need to migrate data from one DB to another. I choosed to use SqlBulkCopy, but have a problem with it, because source database has different collation than destination, so, I’ve got an exception: System.InvalidOperationException: The locale id ‘1049’ of the source column ‘Id’ and the locale id ‘1033’ of the destination column ‘Id’ do […]

Cheap/Best Dashboard Solution for Microsoft SQL Server Reporting Services and .Net

We are a small software company providing a simple ERP solution to our client base based on Microsoft .Net and SQL Server. Our ERP has gathered a lot of data over the years and is at a point in time where implementing data mining, cleansing and analysis services such as dashboards would make sense. My […]

What do I need to set up a development environment for developing in C# & SQL Server?

I have Visual Studio 2010 installed, but that’s about it. I am not sure what else is needed to be installed in order to start going through the many C# (accessing SQL Server) available out there. Tips and links to a step-by-step dev env setup instruction are greatly appreciated.

What is the correct way to join 3 tables using EF

It might be because its a little early in the morning and the brain is not functioning correctly but I have a question regarding the entity framework and SQL Lets say I have 2 tables Consumer ConsumerID Name MembershipNumberID MembershipEntry MembershipEntryID EntryDate MembershipNumberID A member can have a MembershipNumberID before having a consumerID. Think along […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.