I pulled an ASPNETDB.MDF off of a server for a ASP site using Forms authentication to my local machine. I added a new user to the database file using the ASP.NET Website Configuration tool. I copied the MDF back to the server and now, i get the following exception whenever I try to log in as any user:
Cannot open user default database. ...
Hi all,
I'm using Entity Framework and MS SQL Server 2008. It seems that Entity Framework always round off decimal entity attribute to nearest integer which is really annoying. Have you seen this problem before and what's your solution? Thanks!
...
Is there a way to find a usage of a function in SQL server 2008?
...
I have two tables:
**Product**
ID
Name
SKU
**Brand**
ID
Name
Product table has about 120K records
Brand table has 30K records
I need to find count of all the products with name and brand matching a specific keyword.
I use freetext 'contains' like this:
SELECT count(*)
FROM Product
inner join Brand
on Product.B...
Quick FTS question.
I have a table(Person) with 10 varchar columns (fname, surname, hair colour, etc), I've create a FT Index on it however queries using containstable return nothing for 'AND' queries e.g. FROM CONTAINSTABLE(tablename, *, 'john AND doe', 20) or
CONTAINSTABLE(tablename, *, '(FORMSOF(INFLECTIONAL, john) AND FORMSOF(INFLE...
Let's assume we have a table Maintenance
Customer LastLogin ActionType
1 12/1/2007 2
1 12/2/2007 2
etc.
We want a list of all customers who at any point during a given year had one or more uninterrupted sequences, 14 days long, of login with action type 2.
I can of course easily do this with code, and even have it be fa...
hi!
As a newb, I already know that I will be berated for asking this question, but I did not find the answer on the site here and could use some help...
I have a table that lists data by the day, and by type. For example
Transaction | Date | Type
-----------------------------
Updat | 11/7/2008 | Cash-out
Update | 11/10/2008 ...
I need a stored procedure or script which will script out all database level permissions- including permissions to xp_cmdshell for any objects as well as permissions to a sql proxy account.
Thanks!
...
My warehouse datamart data is split across 3 databases on the same server. This is Proof-Of-Concept project with three extracts that were loaded into individual databases.
While pulling into a cube, I am essentially doing this:
SELECT * FROM DB1.dbo.Fact_Pres
UNION
SELECT * FROM DB2.dbo.Fact_Pres
UNION
SELECT * FROM DB3.dbo.Fact_Pres
...
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...
I'm trying to use the Relationships dialog in SQL 2008 to add a new foreign key to a table field. When I go to add one, I am not able to change and specify the Foreign Key Base table or any others in the "Tables and Columns Specification" area...they're all greyed out for those values and uneditable and I"m not sure why.
...
Hi everyone,
I'm using SQL Server 2008's management studio and had a question about having multiple query windows etc open. If I have seven or eight going at once obviously their tabs won't all fit on the screen. But when I go to the "active files" drowpdown at the right often times the names are truncated with an ellipsis in the midd...
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...
I know this is a task that can't be unique, but I can't seem to find a way to do what I'm thinking in my searches and reading, so if it's not possible, I'd like to know if I'm choosing the best alternative.
Simple case of moving information on people from the old database to the new. The problem is that the old schema has the address on...
I read the documentation at msdn about spatial indexes but I do not understand two things,
what are the keys for the index.
how and where are the sets of covered cells represented in the B-tree.
...
I've got an existing advanced search method in a repository that checks a FormCollection for the existence of search criteria, and if present, adds a criterion to the search e.g.
public IList<Residence> GetForAdvancedSearch(FormCollection collection)
{
var criteria = Session.CreateCriteria(typeof(Residence))
.SetResultTransformer(...
Hello!
I have an SQL Query like this:
SELECT TOP (@TopType) AdvertID, IsAdvertImage, AdvertData
FROM Adverts
WHERE AdvertSize = @AdvertSize
ORDER BY NEWID()
Each row in the table Adverts also has a column called Views, is it possible to also increase views with 1 for the banners that has been fetched? So I set TopType to 4 and get 4 ...
Hello,
I think something happened to an mdf file on disk.
When I try to start SQL Server Mgmt Studio (SQL Server 2008, Win 7 x64), I get an error:
"Cannot open user default database."
Since I can't connect at all, how do I fix this?
I have tried connecting to other dbs using osql, but always get an error.
Thanks for any workarounds...
...
We recently updated our WPF application to perform its data synchronisation (using sync framework) within a single transaction against our SQL Server 2008 database.
Almost straight away this has somehow led to a row being locked in of of the tables
preventing all other users from syncing.
The thing is that the lock does not seem to be...
I have a report in SSRS 2008 that shows data aggregated from four levels of grouping. I'm using the ASP.NET ReportViewer control to show the report on my webform.
If I show all four levels in detail, the report gets very very long (hundreds of pages). So therefore, I'd like to set a default level to show (1-4) when I render the report -...