I am accessing an SQL Server database using Windows Authentication
Do I need to encrypt the connection string in the web.config?
Does the name of the connection string (or database) matter in terms of security? (viz: ApplicationServices?
...
Is there any option in sql server 2005 management studio to change columns in a table by hand and by the sql commands alter table or insert into.
If yes, then could someone please show how or link to some instructions?
...
I am writing a small framework in C# for importing data to SQL Server.
I have noticed that if you try to use the ? placeholder for parameters, they do not work if you use the System.Data.SqlClient namespace.
However, if you use the System.Data.OleDb namespace for working with the database, they work just fine. (you just have to add Pr...
Error: System.Data.SqlClient.SqlException: The INSERT statement conflicted with the FOREIGN KEY constraint "FK__Item__order__3AE27131". The conflict occurred in database "pmall", table "dbo.ItemSaved", column 'id'.
Here's my table:
ItemSavedUnits
id
ItemID (is set in this table a FK to Item.id)
...etc.
Here's my insert stat...
In theory since SqlCommand implements IDisposable a SqlCommand object should always be disposed. I personally wrap a using statement around them. However I see lots of code that never disposes of SqlCommand objects without any apparent problems.
I understand that finalizers will ultimately be called by garbage collection but since that ...
In my ASP.NET web app I'm hashing my user passwords with SHA512.
Despite much SO'ing and Googling I'm unclear how I should be storing them in the database (SQL2005) - the code below shows the basics of how I'm creating the hash as a string and I'm currently inserting it into the database into a Char(88) column as that seems to be the le...
We're trying to identify the locations of certain information stored across our enterprise in order to bring it into compliance with our data policies. On the file end, we're using Nessus to search through differing files, but I'm wondering about on the database end.
Using Nessus would seem largely pointless because it would output the...
It doesn't seem that any amount of reading the docs will help me. Consider the simplified example:
declare @table1 table ( id int, parent xml )
insert @table1 values( 1, '<Root></Root>' )
declare @table2 table ( id int, guts xml )
insert @table2 values( 1, '<Guts>hi mom!</Guts>' )
select t1.parent.query('')
from @table1 t1 inner join ...
Let me describe the scenario:
Our VB.NET web application talks to a third party data provider via webservices. It also saves data in a HUGE SQLServer database which has extensive business logic implemented in stored procs and triggers. The webservice provider also employs convoluted business logic which is quite dynamic.
The dilemma ...
I have two tables
Product (id int, brandid int,Name nvarchar(1000)) 2+ million rows
Brand (id int,name nvarchar(1000)) 20k rows
FullText index is enabled on both table's name field.
If I do a search such as
SELECT count(*)
FROM Product p join Brand b
on p.BrandID = b.ID
WHERE contains(b.name,'calvin')
Runs super fast...
We're using SQL 2005 and want to identify individual users so we can trace their SQL for performance purposes, but we're finding it hard to unique identify who is who.
We're using SQL 2005 with connection pooling so every user has the same user in the Activity Monitor. Their NT user name doesn't appear to be set - maybe because we're us...
I have stored proc that will tell us if there is any new checks to be printed. Now I have to manipulate the data in database table in order to get at least one check to be printed. I didn't write this query. I tried but I didn't get at least one check to be printed. Can anyone help me. HERE IS THE STORED PROC
CREATE PROCEDURE [proc_1250...
Is there a way to see what connection string was used to connect to SQL Server? Or rather what string was used in a failed login attempt.
Many times I deal with complex systems in which I see failures caused by some service failing to log in to SQL. I am guessing the connection string might be wrong, but since I can't see what it was I ...
how to display multiple records from database having the same field value by using result set statement
...
I want to do a case sensitive search in my SQL query. But by default, MS SQL server does not consider the case of the strings.
Any idea on how to do a case sensitive search in SQL query?
...
We are using SQL Server 2000 for our online application.
Recently we are getting one problem like login_per_seconds is too high . Its turned to the critical error and need to be figure it out.
Can any one please help me to get of this critical problm . . .
...
I have a MSSQL Database, and I have a stored procedure for any possible query, most of them just return a row of data with 3 columns or just execute an INSERT
How in java to connect to the DB and execute a stored procedure, and retrieve some data ?
...
I'm working on a sql query that is passed a list of values as a parameter, like
select *
from ProductGroups
where GroupID in (24,12,7,14,65)
This list is constructed of relations used througout the database, and must be kept in this order.
I would like to order the results by this list. I only need the first result, but it could be ...
Hi, in this SO question the OP wanted to drop the 0's in the decimal places for his results. Now the example I gave (below) to get around this was to CAST with DECIMAL, then CAST with FLOAT.
e.g.
SELECT CAST(0.55 AS FLOAT)
Using the example above and running it in SQL Server 2005/2008 would seem to bring up the correct result of 0.5...
Hello people. Here is the CASE
I have an sql table consisting of just one data column, consisting of some group names. Here how the table looks:
OPEN SYSTEMS SUB GR
OPEN SYSTEMS SUB GR (GM/BTIB(1111)/BTITDBL(2222)/BTVY(4444)/ACSVTYSAG
INFRASTRUCTURE SOFT SUB GR
INFRASTRUCTURE SOFT SUB GR (GM/BTIB(1111)/BTUGBL(3333)/BTUGBL(3333)/BTAUS...