This is in C#, Visual Studio 2008, crystal reports that came with VS2008
I've got a crystal report viewer form that resides in a DLL. The DLL is responsible for loading the crystal report (based on report filename), and displaying the report on the form.
When I'm done with the crystal report, i call dispose on the loaded reportdocum...
I have a problem with conditional page breaks in Grouping, actually now I'm using SSRS2005.
My requirement was to give page break as per the parameter selection.
I have three groups in by table, if the user selects page break at first group is True, then I need to give page break while the first group change... likewise I have to give...
I want to know how to take input from users in T-SQL.
For example, how would I do a program which takes two numbers from user and adds them together?
...
We have a transact sql statement that queries 4 tables with millions of rows in each.
It takes several minutes, even though it has been optimized with indexes and statistics according to TuningAdvisor.
The structure of the query is like:
SELECT E.EmployeeName
, SUM(M.Amount) AS TotalAmount
, SUM(B.Amount) AS BudgetAmount
...
I have a nvarchar column BigMacs in table McTable in my MS SQL 2005 database with alfanumeric and numeric values. For example:
132
432adfad
sfs54543
5256
And now i would like to do something like this:
select Convert(BigMacs, int) from McTable
where IsNumerc(BigMacs) = 1 AND Convert(BigMacs, int) > 6
But when I do this i get a err...
I'm using the MFC class CDatabase. To establish a connection to SQL Server, I'm calling OpenEx() with a connection string. My problem is that the object seems unable to interpret the DSN part of the string. The connection string looks like this:
ODBC;DSN=mySystemDSN;UID=myUsername;WSID=myMachineName;DATABASE=myDatabaseName;Trusted_C...
I have a data list with paging which works fine locally debugging but doesn't work on my deployment server provided by my hosting company.
Line 151: TotalRowCount = pagedData.DataSourceCount;
I'm using the same remote database for both local and on deployment server.
Error message:
Server Error in '/' Application.
Object refe...
Imagine I have the following 3 tables in SqlServer:
Customer (CustomerID, FirstName, LastName)
Address (AddressID, CustomerID, Line1, City, State)
Product (ProductID, CustomerID, Description)
A customer can have multiple delivery addresses and mulitple products.
What I would like to do is to list the number of customers for each Stat...
I have an organization table and an organization membership table
Org table: |OrgId|Name|...|
Org membership table: |MembershipId|Parent organization id|Child organization id|
This describes an org structure where one organization can be a child of several parent organizations, the parent organizations may in their turn be children of...
In SQL Server you are able to have application role security, through which you are able to for example give specific permissions that originate from specific applications.
You can execute sp_SetAppRole() to set the application role but was wondering how this could be accomplished when using a LINQ2SQL datacontext with the least amount ...
I have the following data :
SectorKey Sector foo
1 A null
2 B null
... ... ...
1 null a
2 null b
2 null c
1 null d
2 null e
... ... ...
I want to update column Sector when it's null based on the value of sectorKey, ie I want Sector t...
I don't have much experience managing reports, but I work on an application that works like this:
There is an interface for the users to select a report they want to view from a list of reports. This list is populated by a reports table in the database which holds info like the report name, the file name, and which parameters the report...
We have a large application mainly written in SQL Server 7.0, where all database calls are to stored procedures. We are now running SQL Server 2005, which offers more T-SQL features.
After just about every SELECT, INSERT, UPDATE, and DELETE, the @@ROWCOUNT and @@ERROR get captured into local variables and evaluated for problems. If the...
I am setting up full text search on an existing database. We have Document table with the following schema:
ID int Not Null,
Data varbinary(max) Not Null
MimeType varchar Not Null
I want to use full text search on the data column, using the mimetype to specify the document type.
I was hoping it would be possible to register new types...
Is it possible to implement something like the following trigger
CREATE TRIGGER [tr_AU_ddl_All_Server] ON DATABASE
WITH EXECUTE AS self
FOR DDL_DATABASE_LEVEL_EVENTS
AS
DECLARE
@data XML
, @rc INT
SET @data = EVENTDATA()
EXEC @rc = __AU.dbo.AU_DDLLog @data
GO
BUT on the whole server. My idea is to cap...
I am trying to insert values from one table in to the other, with an additonal parameter that is required. For instance:
INSERT INTO table1(someInt, someOtherInt, name, someBit)
SELECT someInt, someOtherInt, name FROM table2
someBit is not allowed to be null, and I need to set it to False, but I am not quite sure how use it in th...
We want to use SQL SERVER 2008 Full Text Search and seem to run into a lot of problems handling the search query.
If the user types in "blue dog" it just crashes sql unless we parse the search terms to include the "" around the words but that makes it a phrase instead of keywords.
I want results where blue or dog are included but that ...
Is there a way to perform updates on a PIVOTed table in SQL Server 2008 where the changes propagate back to the source table, assuming there is no aggregation?
...
So after recovering a bunch of SharePoint MDF files from a SAN that went south due to client configuration idiocy we are now at the point where we are trying to reconnect the SQL databases. There were a handful of small databases that we recovered that mounted with no issues however the important database that holds an entire document m...
I'm using the NHibernate HBM2DDL SchemaExport tool to generate my database from my entity objects, and I want to use SQL Server Timestamp columns for optimisitic concurrency.
I've added properties to my entity object that look like this:
public virtual byte[] Timestamp { get; set; }
NHibernate will generate the Timestamp column, but t...