Tag: .net

Protecting my database files

I have a Windows .net application using SQL Server 2005 Express as database, which is used on a server with multiple clients. The users insert, view and update data via the application. For this, I have to put the .mdf files in a folder on the server. Is there any other way? Now in this […]

sql permissions to a login user to further create logins and application roles

I am using SQL Server Express 2005. I have only a single database to work with & create logins, users and grant permissions on this database only. I created a database shopDB. Then a login shopDBLogin. Then I selected shopDB & created a user shopDBUser for shopDBLogin. The code is: create database shopDB use shopDB […]

event handling in c# .net winform application which uses sql server

i have a combobox with a list of SQLusers, which have permissions granted from beforehand. a table PERMISSION_DETAIL with columns username, permission_name consists the details of permissions granted or denied now when a user selects a SQLuser from combobox then the permissions are shown as a checkbox, like if permission is already granted, then the […]

What are good problems to solve using CLR stored procs?

I have used CLR stores procedures in SQL server for awhile now, but I’m still wondering what the best situations to use them are. MSDN provides some guidelines for use like heavy string manipulation (regex), or replacing T-SQL that declares lots of table variables and cursors. I’m curious to know what problems SO users are […]

change data source dynamically from .net application & pass to connectiong string

My Visual Studio .NET application uses SQL Server 2005 Express. It has to be installed on my customer’s main server system & on two client computers.all with Windows XP or Vista or 7. Now, every time when i install my application & SQL Server on my customers computers, I have to change the server name […]

What are the good practise for storing document with sensitive data

My question is what are the good practise’s to store document with sensitive data that might need encryption. Few thoughts that I have are: 1) Store all document in Sql Server as FILESTREAM (don’t know the drawback’s of it. 2) Use one of these NoSql Db. But then how safe it will be to keep […]

how to detect sql data changes to refresh cache data?

how to detect sql data changes to refresh cache data?i have cache algorith . i know caching . But i want to need some special usage to detect any changes in sql. How to make it below?BUT I NEED some advice and performance

SQL Server DateDiff Vs .Net DateDiff

SQL Server: DECLARE @Date1 DATETIME SET @Date1 = ‘2012-26-12 12:00:05 AM’ DECLARE @Date2 DATETIME SET @Date2 = ‘2012-28-12 12:00:00 AM’ SELECT @Date1, @Date2, DATEDIFF(DAY,@Date1,@Date2) return 2 VB.Net DateDiff(DateInterval.Day,Convert.ToDateTime(“26-12-2012 12:00:05 AM”), Convert.ToDateTime(“28-12-2012 12:00:00 AM”)) return 1 Why are the results different? My two cents is that SQL Server’s DateDiff subtracts only day part of the date […]

MySql or MS Sql Server with .Net Application

I’m developing a software using .Net platform. I want to know is it better to use MySql instead of MS Sql Server Express or not? My concern is the DBMS integration with ADO.NET and Entity Framework. Of course I don’t want to rewrite the codes which Microsoft has written for integrating MS SQL Server and […]

How to Troubleshoot Intermittent SQL Timeout Errors

We’ve been having a few instances per day where we get a slew of SQL Timeout errors from multiple applications (System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.) We have over 100 different applications on our network, both web and desktop apps. Everything from […]

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