|
Hi all,
I am using ASP.net 1.1 with backend MSSQL.
I have a table Category
Catid Catname
C1 Test1
C2 Test2
I have a Request table
id request categoryid status flag
1 abcd Request C1 0 F
2 xyz request C2 0 F
3 sdf request C1 1 I
4 ab Request C1 1 I
5 prz request C1 1 I
6 frf request C2 1 F
7 frf request C1 1 F
8 frf request C1 1 F
i want show its countlike
CaetgoryName Waiting INCOMING OUTgoing
Test1 1 3 2
TEST 2 1 0 1
how i make sql query???
is there any way show this to my webform???
thankx in advance..
All I ever wanted is what others have.... CrazySanker
|
|
|
|
|
Write a query that includes a GROUP BY clause to group by the fields you want to count on (categoryd).
Use the COUNT aggregate function to count the instances of records with a particular categoryid.
Paul
|
|
|
|
|
hi frndz,
I got is solution...
creat a UD function
<br />
CREATE FUNCTION GetCount (@Request CHAR(1), @CatID VARCHAR(5)) <br />
RETURNS INT AS <br />
BEGIN <br />
<br />
Declare @Count INT<br />
<br />
IF @Request = 'W' --Waiting for approval<br />
SELECT @Count = count(RemitterRefNo) from TblRemittanceTxn<br />
WHERE Category='O' AND status=0 AND Catid=@CatID<br />
<br />
ELSE IF @Request = 'I' ---Incoming <br />
SELECT @Count = count(RemitterRefNo) from TblRemittanceTxn<br />
WHERE Category='I' AND status=1 AND Catid=@CatID<br />
<br />
ELSE IF @Request = 'O' --OutGoing<br />
SELECT @Count = count(RemitterRefNo) from TblRemittanceTxn<br />
WHERE Category='O' AND status=1 AND Catid=@CatID<br />
RETURN @Count<br />
<br />
END<br />
and use a query like this
<br />
Select distinct catname, <br />
dbo.GetCount('w',catid) as waiting_count,<br />
dbo.GetCount('i',catid) as incoming_count,<br />
dbo.GetCount('o',catid) as outgoing_count,<br />
from Category
All I ever wanted is what others have.... CrazySanker
|
|
|
|
|
Hello There
I have one asp.net page for user registration. It displays when user click Sign In. This is a modelless popup ( I tried Modal as well) The page has to get all the information and on click of submit it needs to post the data to server. The problem is when I click submit button it opens a new window automatically and submits the data in that window.
Is there any solution where I can Stop the opening of new window and could post the data within same window ?
Thanks
|
|
|
|
|
Check Form tag in html source,
I think there is an action property U have set it. remove it.
or
check ur button click event.
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
No there is no Action proprty set as this has to auto post . The form tag is set to runat="server" so on button click when there is a server side event it auto post the form and you do not need to set the actions or any manual method to submit.
Problem still there. if you would try this by adding two pages you could see what I means
|
|
|
|
|
Runtime Error
Description: An application error occurred on the server. The current custom error<br> settings for this application prevent the details of the application error from <br> being viewed remotely (for security reasons). It could, however, be viewed by <br> browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on <br> remote machines, please create a <customErrors> tag within a "web.config" <br> configuration file located in the root directory of the current web application. <br> This <customErrors> tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error <br> page by modifying the "defaultRedirect" attribute of the application's <br> <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
I am getting this Error ever after I set <customerrors mode="Off"> in my web.config file.
I am not using an sessions or database connection or login page etc.It's just a simple site.
I want to know the best setting of web.config file for hosting
I have not failed. I've just found 10,000 ways that won't work. -Thomas A. Edison
Thank u
Chandu
|
|
|
|
|
Set CustomErrors mode="Off" in ur webconfig file
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
Thanks for u r reply.
I already made the change even then it is giving the same error.
I have not failed. I've just found 10,000 ways that won't work. -Thomas A. Edison
Thank u
Chandu
|
|
|
|
|
Ensure that you have loaded the web.config file in your root directory
Jith
|
|
|
|
|
|
This page[^] lists all SQL Server data types and their .NET equivalents.
Paul
|
|
|
|
|
Hi I have some functions in my javascript,
Its using for the asp.net textbox value condition checking,
Its exceuting the html button click process time,
But that functions want to execute when the cursor goes to next tool that time itself...,
Similarly like our server control regularexpression validator...,
Means after enter the value in that textbox,if i press the tab control or anyother process i did that time the script want to check the asp.net textbox value...,
How to do that?,
Plz give me some solution for this probs...,
Advance thanks,
Regards,
Magi
|
|
|
|
|
I mean, I did like this:
I put DataList inside the DetailsView, and there is an Image controol inside the Data list, I need to get that Image to change its' ImageURL property from the C# Code file.
I tried this:
<br />
DataList ImagesDataList = (DataList)DetailsView1.FindControl("DataList1");<br />
Image ImageControl = (Image)ImagesDataList.FindControl("ImageControl");
But it doesn't work.
thx
|
|
|
|
|
Yes U can get.
what error r u getting here?
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
It just doesn't find Image control, when I'm debugging it, it just shows me NULL.
|
|
|
|
|
U need to bind Datalist first.
best regard
Pathan
---------------------------------------------------
|
|
|
|
|
Bind?
What is that?
Thank you
|
|
|
|
|
hi there !
I'm new in asp.net , I want to add menu in the page like the menu of WinApplication .
thanx for any help !
s_mostafa_h
|
|
|
|
|
when i specify master page in web.congig file by this code
configuration
system.web
pages masterPageFile="~/Wrox.master" /
/system.web
/configuration
rhen when try to add content page that use master page
wizard ask me to choose the master page to that content page
so my question
what is the useful of code in web.config file
and why & when we use it
md_refay
|
|
|
|
|
Hi all,
My requirement is "Comparing two versions of the same document (word)side by side graphically" .
In brief:
I have a DataBase table called "DocumentTable" that contains column fields "DocStatus" , "DocLocation" , "DocName", "Supercede"
'DocLocation' column field holds file location information
'DocName' column field holds name of the document
'DocStatus' column field tells the status of the Document (like '0', '1')
'Supercede' column field holds the information of previous version of the file
So, when DocStatus value is '1' then my application should get (dynamically) the current version of the file from the location specified in 'DocLocation' field and the copy of previous version stored in other location and then compare these two versions side-by-side graphically.
So all, please let me know if anyone has some idea about how to implement or any suggestions to proceed.
I appreciate your time and thanks in advance.
Note: If you have any doubts on my requirement please let me know..
Regards,
Krish.
Krish
|
|
|
|
|
i m using asp.net(1.1)(C#) as frontend and sqlserver2000 as backend. how can i create report in pdf format?
|
|
|
|
|
By buying an SDK that generates pdfs, or looking for a free one.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
You'll need some SDK for that.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
How I can redirect to the local area network database from internet?
Ejaz
|
|
|
|