Hi ,
I need to add default value column in SqlServer Compact....i am new to this SQL server compact so Plz anyone tell me the Solution of this....
Thanks In Advance
to create new a new databse file start sql server management studio express on db server and create it!
i would like to create a database using c# in my web application visual studio 08
is it possible?
as connection string has to have a name of database to connect, but i want to create one.
Hello guys
does anyone know how to convert this SQL statement to a LINQ to a List?
SELECT TOP(5) COUNT(CategoryId), CategoryName
FROM Tickets
GROUP BY CategoryName
The result would be something like
public static List<Categories> List()
{
MyEntities db = new MyEntities();
/* here it should return a list o Category type */;
return db.Category.GroupBy(...).OrderBy(...);
}
What do I need to consider before I switch a bunch of fields from VARCHAR(bignumber) to TEXT?
Aside from performance, and sometime in the far future TEXT will be deprecated, and aside from the fact that it looks like I need to drop and recreate the table to alter the column's data type?
This is for SQL 2000-- I can't do VARCHAR(max) and VARCHAR(8000) isn't large enough.
Query:
select emp.empname as Name, dep.depname as Department
from Employee as emp
inner join Department as dep on emp.depid=dep.depid
where emp.id='2'
How can I change this to linq to sql?
I have a product table where the description column is fulltext indexed.
The problem is, users frequently search a single word, which happens to be in the noiseXXX.txt files.
We'd like to keep the noise word functionality enabled, but is there anyway to turn it off just for this one column?
I think you can do this in 2008 with the SET STOPLIST=OFF, but I can't seem to find similar functionality in SQL Server 2005.
So SQL Server 2008 in Hyper-V is a supported configuration, and should perform well as long as you use fixed or pass-through disks and increase your processor/memory settings appropriately. My question is can I use snapshots as a reliable backup mechanism, or should I use the tried and trusted maintenance plan to do my backups?
I have a data set that I import into a SQL table every night. One field is 'Address_3' and contains the City, State, Zip and Country fields. However, this data isn't standardized. How can I best parse the data that is currently going into 1 field into individual fields. Here are some examples of the data I might receive:
'INDIANAPOLIS, IN 46268 US'
'INDIANAPOLIS, IN 46268-1234 US'
'INDIANAPOLIS, IN 46268-1234'
'INDIANAPOLIS, IN 46268'
Thanks in advance!
David
What is the easiest way to take a SQL Server database and make a test copy of it?
I have looked through some existing topics but not sure if there is an easier way. I have database publisher. I want to be able to keep both database on the same server, potentially.
I am working on a big application on SQL Server 2008 with 60 000 stored procedures and over 10 000 tables. Is there a tool through which I can do impact analysis to find out all SPs doing a DML on a table?
In SQL Server, how can I insert data into a table that has just one column which is of identity type?
Such as insert into the following table t.
How can I write the insert statement?
CREATE TABLE t
(
id INT IDENTITY(1, 1) PRIMARY KEY
)
Great thanks.
What are the benefits of storing XML in SQL Server over storing JSON in a varchar field?
Any tutorial available for how to use the XML data type effectively?
Do I need to provide the dtd / xml schema somehow? I've heard it is optional, right?
Thank you.
Simple question I couldn't figure out (not a SQL expert... sorry): I want to do a select on the result set of sp_who2. How can I?
for ex. select SPID from [result set from sp_who2]
Hi,
i am updating some set of records in that table , after that i need to make this table read only.
So How to make a table Read Only in SQL Server?
Regards,
Jeyavel N
How can I copy a table from an SQL Server CE 3.5 database to another (also CE database) in Visual Studio 2008, using the design tools?
Note: When right clicking on a table there is a "copy" command, but I couldn't find any "paste" command so far...
Is there a query I can write against an INFORMATION_SCHEMA or against the system tables to determine if a column is an identity column in SQL CE version 3.5?
Hi,
I'm developing an applciation using SQL Compact database in Visual Studio 2008. When I start the application and run the process, the data is being loaded into database for few hours worth of few tens of megabytes. However, when I quite debugging, change something in code (not in DB structure), run the project again, the database is erased.
Does anyone know how to prevent this behavior? I need the data to stay in DB to test on it.
Possible Duplicates:
How to calculate age (in years) based on Date of Birth and getDate()
How do I calculate someone’s age in C#?
How to calculate the customer age automatically by using their Date of Birth
using c# and SQL Server 2005
Is it possible via script/tool to generate a delete statement based on the tables fk relations.
i.e. I have the table: DelMe(ID) and there are 30 tables with fk references to its ID that I need to delete first, is there some tool/script that I can run that will generate the 30 delete statements based on the FK relations for me ?
(btw I know about cascade delete on the relations, I can't use it in this existing db)
I'm using Microsoft SQL Server 2008
Just tried creating a data connection to a SQL 2000 database in VS2010's Server Explorer using a .NET Framework Data Provider for SQL Server (versus OLE) and found that it didn't work.
VS2010 complained that I had to use SQL Server 2005 and up.
This used to work in VS2008 (using .NET Framework Data Provider for SQL Server instead of the .NET Framework Data Provider for OLE DB).
Is this just a VS2010 restriction or has the ability to connect to SQL 2000 with .NET Framework Data Provider for SQL Server been obsoleted in a post-2.0 version of .NET being used by VS2010?
Anyone know why this was done by MS (please don't speculate - I can do that myself ;)?
I have one central SQL Server database which can be offline from time to time. I have a desktop application using Local DB Cache (SQL CE) to synchronize with the central database and I also have a web application with its own SQL Server that I'd also would like to keep synchronized. All synchronizations must be bidirectional.
Is there a way to synchronize my central database with web application's database in the same way as I synchronize my central database with desktop client?
I know about collaboration scenarios and peer-to-peer synchronization but I would like to avoid manual provisioning of databases. I'd like to use integrated sql server 2008 change tracking just like in the SQL CE <-- SQL Server scenario.
How can I connect from vs2005 to remote Sql Server (Sql Server 2008 ) when I connect
I have amessage mean that is not support connecting from VS2005 to Sql Server 2008
Hi,
I was getting issue wen using new Sql method in grails .
import groovy.sql.Sql
def datasource
def organization_config = new Sql(dataSource)
def orgs = organization_config.rows("select o.organizationId,o.name from organization o ")
session.setAttribute("org_results", orgs);
The application is running but getting these errors when restart tomcat server.
SEVERE: IOException while loading persisted sessions: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: groovy.sql.GroovyRowResult
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: groovy.sql.GroovyRowResult
Can any one please tell me wy this is coming .
thanks in advance,
sri..