I use a .mdf database for my asp.net Mvc project. The project is on source control on a tfs.
When I debug the project, Visual Studio copies the database in to the debugmap.
The problem is, when I debug next time, the changes (while testing the previous time) in the database are gone. The reason of this I know, Visual studio copies the o...
Is it possible to ignore the schema in object names when comparing databases using Visual Studio 2010 Schema Compare? For example, I'd like [dbo].[mysproc] and [mysproc] to be considered equivalent.
...
The following code executes one stored procedure. The stored procedure has only one command in it. Is there any benefit to wrapping everything in a transaction, even it only has one SQL statement in it (or one stored proc that has only one sql statement)?
In the sample code below, if the delete fails, it fails. There is nothing else ...
Can a Timestamp (rowversion) column in a SQL Server table be queried? If so, how?
I'd like to do something like this:
Select * From MyTable Where MyTimestampColumn = "???"
But am not sure what to put in for "???"
Thanks - Randy
...
I am searching for DAL or ORM (Only ORM no MVC) Solution in PHP5 that can efficiently access SqlServer.
I am new to SqlServer. and I need to code a part of ASP.net website in PHP5.
I am currently Using QCodo However its codegenerator is making some problem with ASP's own tables (?? the ASP Guys told me that its for ASP's Membership Manag...
I need to be able to select only the first row for each name that has the greatest value.
I have a table with the following:
id name value
0 JOHN 123
1 STEVE 125
2 JOHN 127
3 JOHN 126
So I am looking to return:
id name value
1 STEVE 125
2 JOHN 127
Any idea on the MSSQL Syntax on how to perform this operation?...
Hi. I have a table A (Acons, A1, A2, A3) in which I should insert information from another table B with columns (B1, B2, B3). The Acons is a column in which should contain some consecutive numbers (it is not an identity and I cannot make it identity). I know xmin - starting the from number the sequence has to be computed. How can I ins...
ColdFusion 9's full text search is now based on Apache Lucene Solr (or Verity, but it has too much limitations). We also use SQL Server.
Which one's better? Which one's easier?
UPDATE: going to use for... searching against the name & description fields of the Products table.
Thanks!
...
I have two tables
Table Name: Graph
UID1 UID2
-----------
12 23
12 32
41 51
32 41
Table Name: Profiles
NodeID UID Name
-----------------
1 12 Robs
2 23 Jones
3 32 Lim
4 41 Teo
5 51 Zacks
I want to get an xml file like this:
<graph directed="0">
<node id="1">
<att nam...
My application performs a number of queries with the general form:
SELECT <aggregate-functions>
FROM <table-name>
WHERE <where-clause>
GROUP BY <group-by column list>
I would like to know how many records contributed to the aggregate result set (in other words, how many records matched the conditions in the WHERE clause), something th...
I have problem using IIS 7 and SQL Server 2008. When I trying to show my website using IIS as webserver I get the message "[SqlException (0x80131904): Login failed for user..."
When I using the webserver included in Visual Studio 2010 to show same website there is no problem to access the database.
Why is it working with VS2010 webserv...
HI! All
I am quite new to QCodo and SqlServer too.
QCodo Code Generation works fine for MySQL
It also works with General SqlServer Tables
(However I got errors with Tables that doesn't have a PK)
But I've faced the Following Error from the Code generator While Connecting to a Database that is being used for an ASP.net Website.
error: MS...
I have an application that sends an email to a user so that they may access a web form. In the email there is just a link to the start page of this form. Currently, I have the value for the form location hardcoded. Once the app is deployed I know it is in inetpub/wwwroot/appName, which results in a URL of serverip:appPort/appName.
What ...
Hello I'm doing some data conversion from PostgreSQL to Microsoft SQL Server. So far it has all went well and I almost have the entire database dump script running. There is only one thing that is now messed up: dates.
The dates are dumped to a string format. These are two example formats I've seen so far: '2008-01-14 12:00:00' and the...
How can I apply a higher rank to a search result if a search word was found in a specific column?
For example, if the search term is "King", and it was found in "LastName", I want that to be ranked higher than if it appears as part of "King Street" in the address.
How do I do that?
...
It appears to me as the easiest, most straightforward solution, but please correct me if I'm wrong.
Instead of having a fulltext index on all individual columns of a table, isn't it better to just generate one single wide computed column and run the fulltext index against that only?
It appears to me that it gets rid of all the issues o...
Hello,
I'm currently developing a C# app with an SQL Server DB back-end. I'm approaching the point of deployment and hitting a problem. The applicaiton will be deployed within an active directory network. As far as SQL authentication goes, I understand that I have 2 options - Windows Authenticaiton or Server Authenticaiton.
If I use...
I am creating a computed column across fields of which some are potentially null.
The problem is that if any of those fields is null, the entire computed column will be null. I understand from the Microsoft documentation that this is expected and can be turned off via the setting SET CONCAT_NULL_YIELDS_NULL. However, there I don't want ...
Below is what I'm trying to do with by iterating through the records.
I would like to have a more elegant solution if possible since I'm sure this is not the best way to do it in sql.
set @counter = 1
declare @totalhrs dec(9,3), @lastemp char(7), @othrs dec(9,3)
while @counter <= @maxrecs
begin
if exists(select emp_num from #tt...
After creating a SQL Server 2008 database, I made a Linq-to-SQL schema in Visual Studio. Next, in the .dbml visual editor (in Visual Studio 2010), I added PK-to-FK and PK-to-PK associations to the schema.
How do I copy those associations that I created in Visual Studio over to the database? In other words, how do I sync with the DB?
...