sql-server

Why can't I insert a record into my SQL Compact 3.5 database?

Hello, I just made a very simple test app using documentation from MSDN. All I want to do is insert a record into my table which is in a SQL Server Compact database in my VS 2010 app. But when I run it, it acts like it executes fine (no errors), but a record is never inserted into my SQL Compact 3.5 database when I go to view the tabl...

What framework to use to connect to a SQL Server instance from an iPhone?

I need to write an iPhone application to connect an instance of SQL Server but I can't figure out which framework I could use to do this. Is there an ODBC framework I could use? Any links would be appreciated. Please do not tell me to use a web service as that won't fit for this situation. EDIT: I'm building a SQL querying tool for the...

Team Foundation Server 2010 and SQL 2008 Express Advanced Services

As I can see here SQL Express has an edition with reporting services http://www.microsoft.com/express/Database/InstallOptions.aspx Does this mean I can use it to get all features for TFS 2010? Then what should I put when configuring TFS "Analysis Services" : where do I name this parameter when installing SQL Server EXPRESS Advanced ? ...

SQL Server 2005 and Datanucleus problem (ntext query)

Started getting errors with SQL Server 2005 This is the first time i've tested our app with Datanucleus 2.x (last test was made with DN 1.x) I use Eclipse RCP. Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The ntext data type cannot be selected as DISTINCT because it is not comparable. at com.microsoft.sqlserver.jdbc.SQL...

I have an index suggested by SQL Server database tuning advisor and want to inherit this on Oracle but how?

Our application supports SQL Server and Oracle as database backend. During investigation stuff database tuning advisor on SQL Server suggested to create an index on table which resulted significant improvement of query execution time against this table. I'd like to try to create the same index on oracle but a problem with understanding ...

yet another tsql question

i have three tables documents attributes attributevalues documents can have many attributes and these atributes have value in attributevalue table what i want in single query get all documents and assigned atributes of relevant documents in row each row (i assume every documents have same attributes assigned dont need complexity of ...

SQL Server 2005

I created a table as emp_attendance in which I used some columns. Now I want to compare current date of system with current date of table means shows that record which are entered in same date. thank you. ...

Same ASP.NET website on multiple subdomains but different databases ?

Consider that I want to create 10 websites in IIS, each of them pointing to the same website on local hard drive, each one running the same code, but on different subdomain. subdomain1.domain.com, subdomain2.domain.com, ..., subdomain10.domain.com How can I add multiple connection strings in my web.config file and bind each connection ...

Insert statement whith unknown number of values extracted from a string

I have a stored procedure in a sql server 2008 db. This stored procedure takes a parameter that is a list of max 5 comma separated integer values. This string is passed through a php sript and formatted like this: 01,02,03,14,15 These values should go in this table: Id | Type id ------------- 1 | 1 1 | 2 1 | 3 1 | 14 1 | 15 ...whe...

Proper Table Schema

I have a project that I am working on and I can't figure out which would be a "better" table relationship schema. The scope of the area in question are: -User uploads documents (become the owner/author) -User can share document with other users (set share rights) -Any user who has access to document can checkout the document (exclusi...

Why do "I get Failed to generate a user instance of SQL Server" with .NET 4 and not .NET 2 ?

I have created on my local machine with targetframework 4 in visual studio a simple website using the default template (the one with css problem solved here http://stackoverflow.com/questions/3897781/google-maps-api-in-asp-net-masterpage-why-it-stays-blank) I uploaded it to my IIS 7 server which was first configured for .NET 2 so in web...

Repair a SQL Server 2000 MDF file

Hi, I had a SQL Server 2000 MDF on a SQL Server 2005 server (moved from prior version), there was a hardware failure. After sending harddisk, it was supposed the mdf / ldf files were recovered, but i am unable to attach. Something curious is that the MDF file has a date on disk from june 2010 and the problem happened in sept 2010. I ...

Help with sql statement

I want to guarantee that a token is assigned to an order. All available tokens are inside the Token table and each token can ONLY be assigned to 1 order. Here is the sql I came up with: SET XACT_ABORT ON; BEGIN TRANSACTION -- Reserve token. SELECT @token = token, @tokenId = id FROM Tokens WITH (UPDLOCK) WHERE taken = 0; -- Take token. ...

Why are CTE's unable to use grouping and other clauses?

I recently learned about Recursive Common Table Expressions (CTE's) while looking for a way to build a certain view of some data. After taking a while to write out how the first iteration of my query would work, I turned it into a CTE to watch the whole thing play out. I was surprised to see that grouping didn't work, so I just replaced ...

Comparison operations on xs:boolean in SQL Server 2005

Can anyone explain to me the results of this query: declare @xml xml; set @xml = '<node attribute="true">Val</node>'; select T.c.query('xs:boolean(@attribute[1])') Value, T.c.query('xs:boolean(@attribute[1]) = false') ValueEqualsFalse, T.c.query('xs:boolean(@attribute[1]) = true') ValueEqualsTrue, T.c.query('xs:boolean(...

SQL statement filter result

I need to filter the SQL query result according to 3 conditions: 1. Location 2. Doctor Name 3. Specialty Name Below is the sql query if all 3 conditions are not empty: if (location != "" && doctor!="" && specialty!="") select Location, ... from clinicdoctors where Location = @Location and DoctorName = @DoctorName and SpecialtyName = @...

Is this error related to the OS or the database ??

I have a java programs that gives me an error after working fine for a few hours ... these programs used to work fine on our earlier server which had windows server 2003 now we have upgraded to windows server 2008 with a higher configuration and newly installed SQL Server .Is there any db setting that i'm missing or is there any OS setti...

Referential integrity in a relational data warehouse. Is it worth it? and what are the alternatives?

Hi, If you had to build a relational data warehouse of biblical proportions using SQL Server 2008, would you use foreign keys to enforce data integrity, or would you use some other means? I like foreign keys because you only need to get them right once, and they are always there to protect integrity. I was thinking of going the disable...

SMO exception when enumerating SQL Server databases

In my C# 3.5 application I am using SMO to locate runnin SQL Server instances. However, on a clean machine with SQL Server installed I receiving the following exception: Microsoft.SqlServer.Management.Sdk.Sfc.EnumeratorException: Failed to retrieve data for this request. ---> System.IO.FileNotFoundException: Could not find Assembly "Mic...

Passing Variable in SSIS

Hi Everyone, I need some help to pass row value to the other task in SSIS package.here is my sample query select distinct txnno from tbltxn, what I need is to get distinct txnno from this qurey and delete records from other table based on this txnno. I think we can pick txxno in some variable in a foreach in a container and pass that r...