15,893,190 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Rohit Shrivastava (Top 62 by date)
Rohit Shrivastava
3-Mar-14 13:24pm
View
Already did, but no luck.
Rohit Shrivastava
21-Dec-12 14:31pm
View
Reports are deployed in SSRS not on operating system.
Rohit Shrivastava
19-Dec-12 18:48pm
View
theoritically thats what entity framework provides. only constraint is you should have the same schema in both the databases. Have you tried it and facing any issues?
Rohit Shrivastava
19-Dec-12 18:45pm
View
try to write the complete name like databasename.schema.tablename, mostly schema would be dbo.
Rohit Shrivastava
19-Dec-12 18:41pm
View
I agree to SA, although if you really wanna do it, create a new appdomain and load the assembly in that appdomain.
Rohit Shrivastava
19-Dec-12 16:41pm
View
Are you developing a custom visual web part or using any existing webpart? If it is custom webpart then its your code behind which is responsible to store information from the controls into list and you could easily achieve what you are asking.
Rohit Shrivastava
19-Dec-12 16:14pm
View
We can also optimize the query by removing the not exists clause by adding one more having clause Min(temp) >= 60
SELECT
Site,
Avg(Temp)
FROM TableName A
WHERE id >= DATEADD(D , -5, DATEDIFF(D,0, GETDATE()))
GROUP BY Site
Having Min (temp) >= 60 and Count(Distinct Convert(VARCHAR(10),ID , 101))> 5
Rohit Shrivastava
19-Dec-12 14:21pm
View
would be more appropriate if you use Count Distinct on date part of id like below
Having Count(Distinct Convert(VARCHAR(10),ID , 101))> 5 or 10
Rohit Shrivastava
19-Dec-12 1:32am
View
I guess as long as you don't delete it. :)
Rohit Shrivastava
18-Dec-12 22:53pm
View
add Having Count(1) > 5 or 10 whatever days in the end of query
Rohit Shrivastava
18-Dec-12 22:53pm
View
Deleted
add Having Count(1) > 5 or 10 whatever days in the end of query
Rohit Shrivastava
18-Dec-12 21:16pm
View
please remove temp from group by, thats it.
Rohit Shrivastava
18-Dec-12 18:29pm
View
I am getting right result with the sample data, I guess you have just changed <=60 to < 60. post the query and create table script.
Rohit Shrivastava
18-Dec-12 18:17pm
View
Make sure site is int, if its varchar/char then put LTRIM AND RTRIM while Group by... I am sorry for multiple comments.
Rohit Shrivastava
18-Dec-12 18:14pm
View
I guess you have temp as INT, please change AVG to Avg(CAST (Temp AS float))
Rohit Shrivastava
18-Dec-12 18:12pm
View
I tested my query for sample data and it is working fine and giving me single result for each site, could you please post the sample data so that I can test against that.
Rohit Shrivastava
18-Dec-12 18:08pm
View
GROUP BY Site is for outer sql just make sure you have in the end without parenthesis. by the time I will test at my end too
Rohit Shrivastava
18-Dec-12 17:46pm
View
You can check WCF Data Services i.e. OData services
Rohit Shrivastava
18-Dec-12 12:12pm
View
in case of grid events, you are getting full postback/partial? update panel works but progress image does not or update panel is not working? are you using any third party control or its asp.net grid view?
Rohit Shrivastava
12-Dec-12 9:42am
View
I am not sure what do you mean by tabular format?
Rohit Shrivastava
12-Dec-12 1:21am
View
call this before reseting and any code
Rohit Shrivastava
11-Dec-12 16:53pm
View
what exception is coming and on which line, did not understand the question.
Rohit Shrivastava
7-Dec-12 18:39pm
View
please refer http://stackoverflow.com/questions/4932150/expression-for-adding-computed-column-in-datatable-with-a-percentage-sign
Rohit Shrivastava
7-Dec-12 18:26pm
View
Do you want to delete/filter all the records which have value 1 in column "sensor1_1"? Just try to write the criteria on which you want to delete/filter the records, we got the samples but why only these two why not rest?
Rohit Shrivastava
7-Dec-12 18:19pm
View
You could change InstanceContextMode.PerSession to InstanceContextMode.PerCall. other option could be to use unity and control the lifetime of dependent object using unity lifetime manager, thought you need to take a look at Unity wcf extensions (long route but much more mangeable).
Rohit Shrivastava
7-Dec-12 15:57pm
View
I agree to Adam, otherwise in your approach you need to change data type of Trans_NO to int / Convert it to int while applying max().
Rohit Shrivastava
5-Dec-12 16:07pm
View
Have a look at http://zoom.it/pages/api/
Rohit Shrivastava
5-Dec-12 16:04pm
View
why dont you consider SharePoint with integration with Project server?
Rohit Shrivastava
27-Nov-12 15:48pm
View
I tried developing a report and was able to successfully use lookup, could you please post content of your rdl file as xml. which might help in identifying the actual problem here. please check for proper case of field name.
Rohit Shrivastava
27-Nov-12 11:29am
View
Try to create a DSN and test your connection, also include following details
operating system (32bit/64bit)
which driver do you have installed
keep in mind that visual studio is 32 bit application so on 64 bit OS you need to install 32bit driver and use that while generating model from database and in connection string of web.config you need to use 64 bit driver.
Rohit Shrivastava
26-Nov-12 15:00pm
View
I am not sure about the schema of your datasets
Lookup(Fields!DISTRIBUTOR_ID.Value, Fields!D0030_DISTRIBUTOR_ID.Value, Fields!D0030_LINE_LOSS_FACTOR_CLASS_ID.Value, "DataSet2")
D0030_DISTRIBUTOR_ID should be in dataset2 which needs to be matched with current dataset field value i.e. DISTRIBUTOR_ID.Value (shoule be in the dataset to which table is bind)
Fields!D0030_LINE_LOSS_FACTOR_CLASS_ID.Value should be a field in Dataset2 which needs to be picked up when value matches.
Rohit Shrivastava
26-Nov-12 14:38pm
View
please check uls logs on share point server for exact error.
Rohit Shrivastava
21-Nov-12 16:58pm
View
did you install IIS after installing .Net framework / Visual Studio, if yes then please register aspnet on IIS use aspnet_regiis /i on visual studio command prompt.
Rohit Shrivastava
21-Nov-12 11:27am
View
IMO, type converter may be called when you open the designer and you had a default value for the property e.g. CurrentTime="1/1/2011". It will call type converter and allow designer to convert string to date in the example scenario.
Rohit Shrivastava
21-Nov-12 11:23am
View
without css both buttons are visible in chrome, I tested it. It must be an issue with css.
Rohit Shrivastava
20-Nov-12 17:56pm
View
from your comment it looks like you do not want to down cast rather you want to maintain state. I assume state pattern will help you... following is an implementation based on state pattern. please refer http://www.dofactory.com/Patterns/PatternState.aspx
public abstract class State
{
public abstract void Run();
}
public class CursedState : State
{
public override void Run()
{
Console.WriteLine("hahaha I am cursed;I will run slow");
}
}
public class BlessedState : State
{
public override void Run()
{
Console.WriteLine("hahaha I am blessed;I will run fast");
}
}
public class NormalState : State
{
public override void Run()
{
Console.WriteLine("I am neither blessed nor cursed;I will run at normal speed");
}
}
public class mammel
{
public State State { get; set; }
public void ChangeState(string state)
{
switch (state)
{
case "blessed":
State = new BlessedState();
break;
case "cursed":
State = new CursedState();
break;
default:
if (!(State is NormalState))
State = new NormalState();
break;
}
}
public void Run()
{
State.Run();
}
}
public class Cat : mammel
{
}
Rohit Shrivastava
16-Nov-12 18:46pm
View
use convert method to convert string to datetime updated the solution.
Rohit Shrivastava
16-Nov-12 18:43pm
View
should have posted as Tips and Tricks rather than a question.
Rohit Shrivastava
16-Nov-12 18:08pm
View
I hope you understand that "(new decimal?[]{ j.day1,j.day2,j.day3}.Sum())" will not be executed on sql server rather it would be executed on .Net side. Total of all users you can get from the result set e.g.
query.Sum(item=> item.hours)
Rohit Shrivastava
8-Nov-12 13:40pm
View
Which edition of sql server do you have? SQL Express does not have full text search capabilities.
Rohit Shrivastava
5-Nov-12 15:25pm
View
Instead of executing dynamic query write a static query with param, change to following
select QID,Marks,Question from QBObjective where CASE WHEN @LevelID = 1 THEN 1SubjectID
WHEN @LevelID=2 THEN 2SubjectID
END = @TopicID
I am sure you have limited number of Level as these are referring columns.
Rohit Shrivastava
5-Nov-12 15:16pm
View
at which line do u get index out of range exception?
if it is GridViewRow row = GridView1.Rows[index]; then check the index value?
Rohit Shrivastava
5-Nov-12 12:59pm
View
without the knowledge of schema and indexes i can say try to remove inner distinct as outer distinct anyway will take care of duplicates.
Rohit Shrivastava
24-Oct-12 10:37am
View
Please make sure AppPool identity is set to farm admin account.
Rohit Shrivastava
24-Oct-12 10:36am
View
Deleted
Please make sure AppPool identity is set to farm admin account.
Rohit Shrivastava
24-Oct-12 10:28am
View
are you logged in on the application using farm admin credentials? Try with Elevated Privileges.
Rohit Shrivastava
23-Oct-12 17:29pm
View
please make sure you are providing the atom feed url, not the blog public url. If that is already the case please provide the atom feed url in your post.
Rohit Shrivastava
23-Oct-12 11:36am
View
one option could be reversing the height and width at runtime based on parameters.
Rohit Shrivastava
23-Oct-12 11:28am
View
You could create a main report with two sub report in it and data flow from one to another. If you need to dynamically select the sub reports then try to keep the report name as parameter and set it dynamically on sub report.
Rohit Shrivastava
23-Oct-12 11:25am
View
You need to match the url in tree structure with nodes url and traverse recursively to find the root and apply the selected css on it. You can keep this logic in navigation control if you have encapsulated the navigation in a control otherwise in master page (basically where you can access navigation nodes).
Rohit Shrivastava
22-Oct-12 14:22pm
View
You could probably pass the seed to rand function, though i am not familiar with PHP but random function normally takes seed.
Rohit Shrivastava
19-Oct-12 14:30pm
View
if it is asp.net, in the ItemCommans event you get e.item object which will let you get the values of the columns which user has edited in that row. e.g. e.Item["FirstName"]
Rohit Shrivastava
19-Oct-12 14:26pm
View
Is CustomerId in order table is lookup column to Customer table?
Rohit Shrivastava
19-Oct-12 14:11pm
View
why did you removed .svc file. .svc file will allow to configure end points. You need to have svc file to host your services in IIS. You need to also have correct configuration about the endpoint in web.config file. I would like to know what mechanism are you intended to host your WCF services.
Rohit Shrivastava
17-Oct-12 22:45pm
View
It seems like you have asked the same question few days back. Conclusion was to change Convert.ToString(Session["user"]) != null to Session["user"] != null, why you have re-posted it?
Rohit Shrivastava
16-Oct-12 11:18am
View
also try to add Response.AppendHeader('Expires', 'Sun, 17 Dec 1989 07:30:00 GMT');
Based on http://edn.embarcadero.com/article/39141
Also check for --> Go to tools/internet options/security/custom level and check if "Automatic prompting for file downloads" is disabled.
Please check this thread if it helps http://forums.asp.net/t/1170854.aspx/1/10
Rohit Shrivastava
16-Oct-12 11:07am
View
Response indicates that its cached on client side which also means that file has been downloaded on client machine. Please delete all temporary files and rerun the test and capture fiddler response again which will let us know what MIME-TYPE are we receiving..
Rohit Shrivastava
16-Oct-12 10:46am
View
I doubt that these request / response headers are for window.open. these seems for the page when it loads. window.open request must be a GET request, it cannot be a POST request for default.aspx. I assume popup window opens when user clicks on some button. If do not see any request for "appData/test.xls" then it means that window.open function is not been executed successfully and its a client side java-script problem.
Rohit Shrivastava
15-Oct-12 18:36pm
View
I would suggest to enable diagnostic logging and check for exact error.
Rohit Shrivastava
15-Oct-12 18:16pm
View
I can suggest following:
1. Check if IE7 blocking pop-up window for your application.
2. Check if IE7 have mapping for xls to excel to show.
3. Try to give a name to window in window.open. Page.ClientScript.RegisterStartupScript(Me.GetType(), "click", "window.open('appData/test.xls','testxls','location=no,resizable=yes,scrollbars=yes');", True)
4. Check if you get any javascript error on IE7
5. Check using fiddler if request for test.xls is going to server and what response is coming.
That's all I can think of now.
Thanks
Rohit
Rohit Shrivastava
12-Oct-12 11:06am
View
did you copy the folder from desktop? if yes please try to delete the folder and re-create.
Rohit Shrivastava
10-Oct-12 18:46pm
View
There should be a reference of category table? Do you have one. Please provide the tables and relationships. Is input parameter product id?
Show More