Search Results

Search found 4908 results on 197 pages for 'ssas 2005'.

Page 89/197 | < Previous Page | 85 86 87 88 89 90 91 92 93 94 95 96  | Next Page >

  • Help ! How do I get the total number rows from my mssql paging procedure ?

    - by The_AlienCoder
    Ok I have a table in my MSSQL database that stores comments. My desire is to be able to page though the records using [Back],[Next], page numbers & [Last] buttons in my datalist. I figured the most efficient way was to use a stored procedure that only returns a certain number of rows within a partcular range. Here is what I came up with @PageIndex INT, @PageSize INT, @postid int AS SET NOCOUNT ON begin WITH tmp AS ( SELECT comments.*, ROW_NUMBER() OVER (ORDER BY dateposted ASC) AS Row FROM comments WHERE (comments.postid = @postid)) SELECT tmp.* FROM tmp WHERE Row between (@PageIndex - 1) * @PageSize + 1 and @PageIndex*@PageSize end RETURN Now everything works fine and I have been able implement [Next] and [Back] buttons in my datalist pager.Now I need the total number of all comments(not in the cuurent page) so that I can implement my page numbers and the[Last] button on my pager. In other words I want to return the total number of rows in my first select statement i.e WITH tmp AS ( SELECT comments.*, ROW_NUMBER() OVER (ORDER BY dateposted ASC) AS Row FROM comments WHERE (comments.postid = @postid)) set @TotalRows = @@rowcount @@rowcount doesnt work and raises an error.I also cant get count.* to work either. Is there another way to get the total amount of rows or is my approach doomed.

    Read the article

  • Stop sign icon in VS2005 Express solution explorer

    - by Andy Bisson
    What does a small stop sign icon on a file in solution explorer mean? Someone asked the same question a year ago Original Question but the answer provided is of no help. The icon looks like this: Suffice to say that the sign is not one presented in the VS documentation and is a UK Stop sign (red circle with a white horizontal bar) not a US one. The project is WebKit and the build process cannot find AuthenticationCF.h even though the file is present. I presume the sign might shed some light on this. Thanks, Andy

    Read the article

  • I want tell the VC++ Compiler to compile all code. Can it be done?

    - by KGB
    I am using VS2005 VC++ for unmanaged C++. I have VSTS and am trying to use the code coverage tool to accomplish two things with regards to unit tests: See how much of my referenced code under test is getting executed See how many methods of my code under test (if any) are not unit tested at all Setting up the VSTS code coverage tool (see the link text) and accomplishing task #1 was straightforward. However #2 has been a surprising challenge for me. Here is my test code. class CodeCoverageTarget { public: std::string ThisMethodRuns() { return "Running"; } std::string ThisMethodDoesNotRun() { return "Not Running"; } }; #include <iostream> #include "CodeCoverageTarget.h" using namespace std; int main() { CodeCoverageTarget cct; cout<<cct.ThisMethodRuns()<<endl; } When both methods are defined within the class as above the compiler automatically eliminates the ThisMethodDoesNotRun() from the obj file. If I move it's definition outside the class then it is included in the obj file and the code coverage tool shows it has not been exercised at all. Under most circumstances I want the compiler to do this elimination for me but for the code coverage tool it defeats a significant portion of the value (e.g. finding untested methods). I have tried a number of things to tell the compiler to stop being smart for me and compile everything but I am stumped. It would be nice if the code coverage tool compensated for this (I suppose by scanning the source and matching it up with the linker output) but I didn't find anything to suggest it has a special mode to be turned on. Am I totally missing something simple here or is this not possible with the VC++ compiler + VSTS code coverage tool? Thanks in advance, KGB

    Read the article

  • Best way to correct garbled data caused by false encoding

    - by ercan
    Hi all, I have a set of data that contains garbled text fields because of encoding errors during many import/exports from one database to another. Most of the errors were caused by converting UTF-8 to ISO-8859-1. Strangely enough, the errors are not consistent: the word 'München' appears as 'München' in some place and as 'MÃœnchen'. Is there a trick in SQL server to correct this kind of crap? The first thing that I can think of is to exploit the COLLATE clause, so that ü is interpreted as ü, but I don't exactly know how. If it isn't possible to make it in the DB level, do you know any tool that helps for a bulk correction? (no manual find/replace tool, but a tool that guesses the garbled text somehow and correct them)

    Read the article

  • Error: Too Many Arguments Specified when Inserting Values from ASP.NET to SQL Server

    - by SidC
    Good Afternoon All, I have a wizard control that contains 20 textboxes for part numbers and another 20 for quantities. I want the part numbers and quantities loaded into the following table: USE [Diel_inventory] GO /****** Object: Table [dbo].[QUOTEDETAILPARTS] Script Date: 05/09/2010 16:26:54 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[QUOTEDETAILPARTS]( [QuoteDetailPartID] [int] IDENTITY(1,1) NOT NULL, [QuoteDetailID] [int] NOT NULL, [PartNumber] [float] NULL, [Quantity] [int] NULL, CONSTRAINT [pkQuoteDetailPartID] PRIMARY KEY CLUSTERED ( [QuoteDetailPartID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO ALTER TABLE [dbo].[QUOTEDETAILPARTS] WITH CHECK ADD CONSTRAINT [fkQuoteDetailID] FOREIGN KEY([QuoteDetailID]) REFERENCES [dbo].[QUOTEDETAIL] ([ID]) ON UPDATE CASCADE ON DELETE CASCADE GO Here's the snippet from my sproc for this insert: set @ID=scope_identity() Insert into dbo.QuoteDetailParts (QuoteDetailPartID, QuoteDetailID, PartNumber, Quantity) values (@ID, @QuoteDetailPartID, @PartNumber, @Quantity) When I run the ASPX page, I receive an error that there are too many arguments specified for my stored procedure. I understand why I'm getting the error, given the above table layout. However, I need help in structuring my insert syntax to look for values in all 20 PartNumber and Quantity field pairs. Thanks, Sid

    Read the article

  • How to break whenever any line of code executes

    - by Aequitarum Custos
    I have a very strange bug, which I believe is caused by some code we have executing, but I'm not sure where. We can reproduce it to the point it happens whenever we click Tab, but short of putting a break point at the beginning of every method in the project to find out what is executing. Is there a way to set visual studio to break whenever anything executes? For those curious about the problem, every now and then, we have a few Rich Text Boxes that refuse to lose focus. You can't click out of it or tab out of it. We have no On Validation or On Text Changed events attached to the control, and believe it's an event attached somewhere else to something we just aren't noticing.

    Read the article

  • Use of unassigned local variable 'xxx'

    - by Tomislav
    I'm writing a database importer from our competitors to ours database:) I have a code generator which create Methods form import to our database like public void Test_Import_Customer_1() // variables string conn; string sqlSelect; string sqlInsert; int extID; string name; string name2; DateTime date_inserted; sqlSelect="select id,name,date_inserted from table_competitors_1"; oledbreader reader = new GetOledbRader(sqlString,conn); while (reader.read()) { name=left((string)myreader["name"],50); //limitation of my field date_inserted=myreader["date_inserted"]; sqlInsert=string.Format("insert into table(name,name2,date_inserted)values '{0}', '{1}', {2})",name,name2,date_inserted); //here is the problem name2 "Use of unassigned local variable" ExecuteSQL(sqlInsert) } As different companies database has different fields i can not set value to each variable and there is a big number of tables to go one variable to next. like sqlSelect_Company_1 = "select name,date_inserted from table_1"; sqlSelect_Company_2 = "select name,name2 from table_2"; is there a way to override the typing of each variable one by one with default values?

    Read the article

  • [c++] - Help about class and error: C3861

    - by Chelsea_cole
    Can someone help me in this error? in "cDef.h" : #pragma once class cDef { public: static int STATE_LOGO; static int STATE_MENU; static int MESSAGE_ENTER; static int MESSAGE_UPDATE; static int MESSAGE_PAINT; static int MESSAGE_EXIT; }; in "GameState.h": #pragma once #ifndef _GameState_ #define _GameState_ #include "cDef.h" class MainGame; class GameState; class GameState { public: MainGame *mg; int GAME_STATE_DEF; virtual void MessengeEnter(int message) = 0; virtual void MessengeUpdate(int message,int keys) = 0; virtual void MessengePaint(int message,CDC *pDc) = 0; void StateHandler(int message,CDC *pDc,int keys); public: GameState(void); public: ~GameState(void); }; #endif in "GameState.cpp": #include "StdAfx.h" #include "GameState.h" GameState::GameState(void) { GAME_STATE_DEF = -1; } GameState::~GameState(void) { } void GameState::StateHandler(int message,CDC *pDc,int keys) { if(message == cDef.MESSAGE_ENTER) { MessageEnter(message); } if(message == cDef.MESSAGE_UPDATE) { MessageUpdate(message,keys); } if(message == cDef.MESSAGE_PAINT) { MessagePaint(message,pDC); } } error: warning C4832: token '.' is illegal after UDT 'cDef' see declaration of 'cDef' error C3861: 'MessageUpdate': identifier not found error C3861: 'MessageEnter': identifier not found error C3861: 'MessagePaint': identifier not found ..... Thanks in advance!

    Read the article

  • how Do I list all table names in SQL Server using T-SQL?

    - by shrimpy
    SELECT name FROM sys.databases -- this can list all database name in the server user database SELECT * FROM INFORMATION_SCHEMA.TABLES -- these two line can list the table for one particular database But how can I output the results like below? Database Table --------- ------------- db1 t1 db1 t2 db2 t1 ... ...

    Read the article

  • Asp.net Report Viewer - Custom filter parameters

    - by Chris
    Hi all, for a data warehouse project I need to know about some best practices regarding custom report viewer filters/parameters. Usually I use the standard parameter feature for reports, like multiple select boxes, check boxes, text boxes etc.. But for the current project some reports require more complex report parameters. E.g. a user wants to analyze some measures. For that the user needs to set a filter on a specific address. There are over 100.000 address to choose from, so he has to have the ability to search for an address (full text). Since such features cannot be done with the standard parameters, I will have to create custom params within a ASPX page which are then passed to the report viewer control. So my question is: Are there any best practices on how to create custom parameters? Did anyone had similar problems, if so, how did you solve it?

    Read the article

  • Odd SQL behavior, I'm wondering why this works the way it does.

    - by Matthew Vines
    Consider the following Transact sql. DECLARE @table TABLE(val VARCHAR(255) NULL) INSERT INTO @table (val) VALUES('a') INSERT INTO @table (val) VALUES('b') INSERT INTO @table (val) VALUES('c') INSERT INTO @table (val) VALUES('d') INSERT INTO @table (val) VALUES(NULL) select val from @table where val not in ('a') I would expect this to return b, c, d, NULL but instead it returns b, c, d Why is this the case? Is NULL not evaluated? Is NULL somehow in the set 'a'?

    Read the article

  • integrity Constraints on a table.

    - by Dinesh
    See this sample schema Passenger(id PK, Name) Plane(id PK, capacity, type); Flight(id PK, planeId FK(Plane), flightDate, StartLocation, destination) CREATE TABLE Reservation(PassengerId, flightId, PRIMARY KEY (passengerId, flightId), FOREIGN KEY (passengerId) REFERENCES Passenger, FOREIGN KEY (flightId) REFERENCES Flight); I need to define an integrity constraint that enforces the restriction that the number of passengers on a plane cannot exceed the plane’s capacity. I have tried and achieved so far is this. CREATE TABLE Reservation( passengerId INTEGER, flightId INTEGER, PRIMARY KEY (passengerId, flightId), FOREIGN KEY (passengerId) REFERENCES Passenger, FOREIGN KEY (flightId) REFERENCES Flight, Constraint check1 check(Not Exists(select * from Flight s, (select count(*) as totalRes from Reservation group by flightId) t where t.totalRes > s.capacity ) ) ); I am not sure i am doing in right way or not. Any suggestions?

    Read the article

  • Is there a way to prevent Triggers from being disabled?

    - by HAdes
    I have a trigger on a table that should never be disabled. It performs certain checks and there have been occasions when other developers have disabled it to get around it. This is not good so I want to be able to turn off trigger disablement on this table alone. Is this possible? If not, any suggestions please. thanks.

    Read the article

  • How can I improve the below query?

    - by Newbie
    I have the following input. INPUT: TableA ID Sentences --- ---------- 1 I am a student 2 Have a nice time guys! What I need to do is to extract the words from the sentence(s) and insert each individual word in another table OUTPUT: SentenceID WordOccurance Word ---------- ------------ ----- 1 1 I 1 2 am 1 3 a 1 4 student 2 1 Have 2 2 a 2 3 nice 2 4 time 2 5 guys! I was able to get the answer by using the below query ;With numCTE As ( Select rn = 1 Union all Select rn+1 from numCTE where rn<1000) select SentenceID=id, WordOccurance=row_number()over(partition by TableA.ID order by rn), Word = substring(' '+sentences+' ', rn+1, charindex(' ',' '+sentences+' ', rn+1)-rn-1) from TableA join numCTE on rn <= len(' '+sentences+' ') where substring(' '+sentences+' ', rn,1) = ' ' order by id, rn How can I improve this query of mine.? Basically I am looking for a better solution than the one presented Thanks

    Read the article

  • Disable Primary Key and Re-Enable After SQL Bulk Insert

    - by Jon
    I am about to run a massive data insert into my DB. I have managed to work out how to enable and rebuild non-clustered indexes on my tables but I also want to disable/enable primary keys. You can't disable the clustered index for the primary key as the table is inaccessible when that is done and my attempt to do a ALTER TABLE for constraints does not work as I think that is only for foreign keys. Do you know of a way to Disable the Primary Key and Re-Enable After SQL Bulk Insert. NOTE: This is over numerous tables and so I don't know the exact primary key specifications eg/name etc

    Read the article

  • How to Convert VS2003 proj to VS2005 proj

    - by Cute
    Hi I have test project which i need to convert from VS2003 to VS2005 and i am afraid i got lot of errors and warnigs. The error mostly appeared is ** error C2220: warning treated as error - no 'object' file generated** The same project wil get compiled in VS2003 and executing wel.what i can do??? Thanks in advance

    Read the article

  • Binding formview with profile in asp.net

    - by IrfanRaza
    Hello friends, I want to display and update user profile using FormView control. But I dont know exactly how to do this. I am using custom providers for Roles, Membership and Profile. Everything is working fine. Can anybody provide solution? Thanks for sharing your valuable time.

    Read the article

  • SQL. Sorting by a field

    - by strakastroukas
    I have created a simple view consisting of 3 tables in SQL. By right clicking and selecting Design, in the Object explorer table, i modified my custom view. I just added sortby asc in a field. The problem is that the changes are not reflected in the outout of the View. After saving the view, and selecting Open view the sort is not displayed in output. So what is going on here?

    Read the article

< Previous Page | 85 86 87 88 89 90 91 92 93 94 95 96  | Next Page >