sql-server

SQL Server 2005 Reporting Services Matrix Total Data Highlighting

I have created a SQL Server 2005 matrix with a total column. I want to be able to change the colors of the totals only so they stand out from the rest of the data. I can change the color of the "total" label, but not the actual data. Can anyone give me a clue of how to do this? ...

SQL Server 2005 cache dependency - is there a limit to the no. of registered tables?

I'm trying to implement sql server 2005 cache dependency in ASP.Net 3.5. I have a lot of lookup tables (around 50 in all) in my database that will hardly change after the initial setup. I plan to register all of them in the SQLCacheDependency. I'm wondering if there will be a performance hit when so many tables are registered, because SQ...

SQL Server Login Configuration and Automation

What's a good way to manage and maintain SQL Server logins, server roles, and individual access rights across multiple databases that exist in multiple environments? What are your best practices? Some info about my situation: SQL Server 2005 We have N amount of "client" databases with identical schemas (in theory, at least) We have a ...

trying to export tables from aspnetdb.mdf into another sql server

i have a SQL server database on a server. I have just recently been playing around with asp.net mvc and i am using the membership login control. i see that it creates a default local database called aspnetdb.mdf with teh following tables: aspnet_Applications aspnet_membership aspnet_paths aspnet_profiles aspnet_users aspnet_usersinRol...

can i view aspnet.db in sql server 2008 management studio

i have just started playing aorund with asp.net mvc and i want to view the database (aspnetdb.mdf) in sql server 2008 management studio but it doesn't seem to let me view this file. any suggestions? ...

Windows Invariant Culture Puzzle

I have a question about the windows invariant culture. Succinctly, my question is: does there exist any pair of characters c1, and c2 such that: lower(c1, invariant) =latin-general lower(c2, Invariant) but lower(c1, invaraint) !=invariant lower(c2, invariant) Background: I need to store an invariant lower case string (represen...

System.ArgumentException: Keyword not supported: 'provider'.

I have a working copy of asp.net mvc site locally. I just uploaded the whole site to my web hosting server. everything looks fine at first but when i login, i get the following error: System.ArgumentException: Keyword not supported: 'provider'. [ArgumentException: Keyword not supported: 'provider'.] System.Data.Common.DbConnection...

Is there any SQL Server studio managment and redgate sqlcompare/datacompare like tools for MySQL?

I'm looking for SQL Server studio management-like and redgate sqlcompare/datacompare-like tools for MySQL. What have you used that is as close to these tools or better for MySQL? ...

Why do table names in SQL Server start with "dbo"?

At least on my local instance, when I create tables, they are all prefixed with "dbo.". Why is that? ...

SQL Escape ' '

Hi I am trying to run a query in SQL 2008 by doing: @query varchar(max) SET @query = 'SELECT * FROM Table WHERE [Name] = ' 'Karl' ' ' EXEC(@query) The problem is that for some reason the apostrophes around 'Karl' don't get escaped, i.e. the query executes as ...WHERE [Name] = Karl and fails. Anyone have a suggestion? Thanks Karl...

How to index .doc and .pdf files in asp.net

How do I index .doc and .pdf files stored in a database (which uses MS SQL Server) in asp.net (C#)? ...

Same query uses different indexes?

Can a select query use different indexes if a change the value of a where condition? The two following queries use different indexes and the only difference is the value of the condition and typeenvoi='EXPORT' or and typeenvoi='MAIL' select numenvoi,adrdest,nomdest,etat,nbessais,numappel,description,typeperiode,datedebut,datefin,codeet...

how to insert record set value in to the table?

How to insert record set value Am having 6 fields in the record set I want to insert into the table? How can I insert. Used Query INSERT INTO table values (recordset (0), recordset (1) ….. recordset (6)) But It showing Undefined function “recordset” Please how to insert record set value in to the table? Query Help? ...

Getting MIN Price in Subquery in SQL Server (using DISTINCT)?

Hi there, I am trying to get a Minimun price from a car in a table i have.. I am using DISTINCT SELECT DISTINCT datepart(year,[Registration]) AS YearRegistered, MIN(SalePrice), Model, Make FROM [VehicleSales] But its not working, for example without distinct returns many car makes and models so i use distinct so i get unique ca...

Dictionary table relationships (MS SQL 2005)

I have table named 'Dictionary' with columns as follow: ID bigint TYPE varchar (200) ITEM varchar (200) Table is used by various tables as simple dictionary / lookup. Eg it stores countries, titles, business type lists. TYPE column keeps info about type of dictionary , ITEM is dictionary string value. All works well but I ha...

using MIN on a datepart with Group BY not working, returns different dates

Hi there, Can anyone help with an aggregate function.. MIN. I have a car table that i want to return minimum sale price and minimum year on a tbale that has identical cars but different years and price ... Basically if i removed Registration (contains a YEAR) from the group by and select the query works but if i leave it in then i get...

asp.net mvc membership error

i am getting this error on the asp.net mvc default site when i try to log in: An error occurred while attempting to initialize a System.Data.SqlClient.SqlConnection object. The value that was provided for the connection string may be wrong, or it may contain an invalid syntax. Parameter name: connectionString this is in the file "Accou...

visual studio pointing to my sql server

in visual studio i have my code point to a sql server mdf file (in the APP_DATA folder). and i keep having to syncronize this local data to my server. is there anyway in visual studio i can just give it the connection string to my real server so i can debug directly against my server. i know this may be a bit slower but it also might ...

Idiom for using SqlDataReader as a resource

Following on from this question, I find myself writing the following code over and over again: SqlCommand command = new SqlCommand(); // Code to initialize command with what we want to do using (SqlConnection connection = openConnection()) { command.Connection = connection; using (SqlDataReader dataReader = thisCommand.ExecuteRe...

sql query to export row values from one SQL Server database to another

I have a table with columns 'id', 'name', 'value', 'uniqueConst' in both databases. Now i need to export only all 'value' fields from one database to another 'where db1.uniqueConst = db2.uniqueConst'. Other fields are already in db2 and 'id's in both db are identity, so i cant just export the whole table. Can you help me? ...