TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
vibha gupta
NA
1
802
bind line mschart using asp.net3.5 and oracle database
Jun 20 2015 8:11 AM
i am using ms chart in visual studio 2008 with asp.net and oracle database but it show me exception and not showing chart on browser please help me this is my
dl class code---
public DataTable USERWISEACCOUNTINGINFORMATIONWITHINBOUNDOUTBOUND(string DomainName, Int32 intUserID, DateTime Fromdate, DateTime Todate)
{
try
{
procedureName = "ReportPack.USERWISEBANDWIDTHINFORMATION";
parametersValue = new object[5];
parametersValue[0] = intUserID;
parametersValue[1] = DomainName;
parametersValue[2] = GetOracleFromDateFormat(Fromdate);
parametersValue[3] = GetOracleToDateFormat(Todate);
parametersValue[4] = "Cur_Type";
this.ExecuteCRUD(true);
return objDataSet.Tables[0];
}
catch (Exception ex)
{
string _policyName = "DB Policy";
return null;
}
finally
{
this.objConnection.Close();
}
}
BL class Code---
public DataTable USERWISEACCOUNTINGINFORMATIONWITHINBOUNDOUTBOUND(string DomainName, Int32 intUserID, DateTime Fromdate, DateTime Todate)
{
try
{
ReportDL objReportDL = new ReportDL();
DataTable dt = objReportDL.USERWISEACCOUNTINGINFORMATIONWITHINBOUNDOUTBOUND(DomainName, intUserID, Fromdate, Todate);
return (dt);
}
catch (Exception ex)
{
return null;
}
}
presentation layer logic------
public void bindChartDetail()
{
objUser = (UserEntity)Session["User"];
if (objUser == null)
{
Response.Redirect("~/Default.aspx");
}
DateTime fromDate;
DateTime toDate;
String strDomainName = "";
if (ddlDomainName.SelectedIndex > 0)
{
strDomainName = ddlDomainName.SelectedItem.Text.ToString();
}
else
{
strDomainName = lblDomainName.Text;
}
if (txtFromDate.Text != "")
{
fromDate = DateTime.ParseExact(txtFromDate.Text, "dd-MM-yyyy", null);
}
else
{
fromDate = toDate = System.DateTime.Now;
}
if (txtToDate.Text != "")
{
toDate = DateTime.ParseExact(txtToDate.Text, "dd-MM-yyyy", null);
}
else
{
toDate = System.DateTime.Now;
}
ReportBL objReport = new ReportBL();
try
{
DataTable dt = new DataTable();
dt = objReport.USERWISEACCOUNTINGINFORMATIONWITHINBOUNDOUTBOUND(strDomainName, 0, fromDate, toDate);
if (dt.Rows.Count > 0)
{
string[] XPointMember = new string[dt.Rows.Count];
DateTime[] YPointMember = new DateTime[dt.Rows.Count];
for (int count = 0; count < dt.Rows.Count; count++)
{
XPointMember[count] = dt.Rows[count]["INBOUND"].ToString();
YPointMember[count] = Convert.ToDateTime(dt.Rows[count]["ACCTSESSIONTIME"]);
}
Chart1.Series[0].Points.DataBindXY(XPointMember, YPointMember);
Chart1.Series[0].BorderWidth = 1;
Chart1.Series[0].ChartType = SeriesChartType.Line;
}
}
catch (Exception ex)
{
}
}
whenever i debug my code it gave exception on DL Logic---
ORA-01722: invalid number
ORA-06512: at "RAVPN.REPORTPACK", line 2690
ORA-06512: at line 1
this is my procedure ----
Procedure USERWISEBANDWIDTHINFORMATION
(
p_UserID integer,
p_CorpName varchar2,
p_Fromdate varchar2,
p_Todate varchar2,
cur_CorpAccInfo OUT T_CURSOR
)
is
a_cou number ;
a_id number;
a_rem number;
begin
delete from TEMP_Userwiseaccinfo WHERE accttimestamp BETWEEN TO_TIMESTAMP (p_Fromdate,'dd-mm-yyyy hh24:mi:ss')
AND TO_TIMESTAMP (p_Todate,'dd-mm-yyyy hh24:mi:ss');
a_cou :=2;
a_id :=1;
a_rem :=1;
FOR cursor1 IN (SELECT *from tbl_userwiseaccinfo
WHERE accttimestamp BETWEEN TO_TIMESTAMP (p_Fromdate,'dd-mm-yyyy hh24:mi:ss')
AND TO_TIMESTAMP (p_Todate,'dd-mm-yyyy hh24:mi:ss')
order by acctsessionid,accttimestamp)
LOOP
if a_cou=1 then
--insert into TEMP_Userwiseaccinfo(id,Username,acctsessionid,acctstatustype,framedipaddress,accttimestamp,INBOUND,OUTBOOUND)values (a_id,cursor1.username,cursor1.acctsessionid,cursor1.acctstatustype,cursor1.framedipaddress,cursor1.accttimestamp,cursor1.INBOUND,cursor1.OUTBOUND);
a_id :=(a_id+1);
a_rem:=0;
a_cou :=2;
else
insert into TEMP_Userwiseaccinfo(id,Username,acctsessionid,acctstatustype,framedipaddress,accttimestamp,INBOUND,OUTBOUND)values
(a_id,cursor1.username,cursor1.acctsessionid,cursor1.acctstatustype,cursor1.framedipaddress,cursor1.accttimestamp,cursor1.INBOUND,cursor1.OUTBOUND);
a_cou :=1;
a_rem:=(a_rem+1);
end if;
END LOOP;
open cur_CorpAccInfo For
SELECT
Row_Number() OVER (ORDER BY a.USERNAME) ID,a.USERNAME,a.DOMAINNAME,a.VRFNAME,a.SERVICENAME,a.FRAMEDIPADDRESS as connectipaddress,a.INBOUND,a.OUTBOUND,
TO_Timestamp (TO_CHAR (a.ACCTTIMESTAMP, 'dd-mm-yyyy hh24:mi:ss'),'dd-mm-yyyy hh24:mi:ss') as connectdatetime,
TO_Timestamp (TO_CHAR (b.ACCTTIMESTAMP, 'dd-mm-yyyy hh24:mi:ss'),'dd-mm-yyyy hh24:mi:ss') as disconnectdatetime,
NVL( time_diff(a.ACCTTIMESTAMP,b.ACCTTIMESTAMP),0) as duration,
'' as calledpartyno,
'' as callingpartyno
FROM
(
(SELECT
DISTINCT TempInfo.ID,TempInfo.ACCTTIMESTAMP, TempInfo.FRAMEDIPADDRESS as FRAMEDIPADDRESS, TempInfo.USERNAME as USERNAME, TempInfo.ACCTSESSIONID,
TempInfo.ACCTSESSIONID||'-'||TempInfo.USERNAME||'-'||TempInfo.FRAMEDIPADDRESS as SessionID,TempInfo.INBOUND,TempInfo.OUTBOUND,CP.VRFNAME,CP.DOMAINNAME,UR.LOGINID,sr.SERVICENAME
FROM
TEMP_Userwiseaccinfo TempInfo
left outer join USERS UR on UR.LOGINID = TempInfo.USERNAME
left outer join TBL_PLAN PL on UR.PLANID = PL.ID
left outer join SERVICE SR on PL.SERVICEID = SR.ID
left outer join TBL_CORPORATE CP on CP.ID = UR.ACCOUNTID
WHERE
TempInfo.ACCTSTATUSTYPE = 'Start'and (CP.DOMAINNAME =p_CorpName or p_CorpName is null)
and TempInfo.accttimestamp BETWEEN TO_TIMESTAMP (p_Fromdate,'dd-mm-yyyy hh24:mi:ss') AND TO_TIMESTAMP (p_Todate,'dd-mm-yyyy hh24:mi:ss')
)a
left outer join
(SELECT
DISTINCT TempInfo.ID,TempInfo.ACCTTIMESTAMP,TempInfo.ACCTSESSIONID,
TempInfo.ACCTSESSIONID||'-'||TempInfo.USERNAME||'-'||TempInfo.FRAMEDIPADDRESS as SessionID,TempInfo.INBOUND,TempInfo.OUTBOUND,CP.VRFNAME,CP.DOMAINNAME,UR.LOGINID,sr.SERVICENAME
FROM
TEMP_Userwiseaccinfo TempInfo
left outer join USERS UR on UR.LOGINID =TempInfo.USERNAME
left outer join TBL_PLAN PL on UR.PLANID = PL.ID
left outer join SERVICE SR on PL.SERVICEID = SR.ID
left outer join TBL_CORPORATE CP on CP.ID = UR.ACCOUNTID
WHERE
TempInfo.ACCTSTATUSTYPE = 'Stop' and (CP.DOMAINNAME =p_CorpName or p_CorpName is null) and TempInfo.accttimestamp BETWEEN TO_TIMESTAMP (p_Fromdate,'dd-mm-yyyy hh24:mi:ss') AND TO_TIMESTAMP (p_Todate,'dd-mm-yyyy hh24:mi:ss')
)b on a.ID = b.ID and a.ACCTSESSIONID = b.ACCTSESSIONID
)
where a.accttimestamp >= TO_TIMESTAMP (p_Fromdate,'dd-mm-yyyy hh24:mi:ss')
and a.accttimestamp <= TO_TIMESTAMP (p_Todate,'dd-mm-yyyy hh24:mi:ss') ;
commit;
end USERWISEBANDWIDTHINFORMATION;
this tis my table
CREATE TABLE "RAVPN"."TBL_USERWISEACCINFO"
( "USERNAME" VARCHAR2(75 BYTE),
"ACCTSESSIONID" VARCHAR2(50 BYTE),
"ACCTSTATUSTYPE" VARCHAR2(30 BYTE),
"FRAMEDIPADDRESS" VARCHAR2(30 BYTE),
"ACCTTIMESTAMP" TIMESTAMP (6),
"CREATEDBY" VARCHAR2(75 BYTE),
"CREATEDON" TIMESTAMP (6),
"MODIFIEDBY" VARCHAR2(75 BYTE),
"MODIFIEDON" TIMESTAMP (6),
"ISDELETED" NUMBER(*,0),
"ACCTSESSIONTIME" NUMBER(*,0),
"NASIPADDRESS" VARCHAR2(30 BYTE),
"INBOUND" VARCHAR2(25 BYTE),
"OUTBOUND" VARCHAR2(25 BYTE)
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS" ;
please any body help me i had searched lot of article but i didn't get my solution ...........
Reply
Answers (
0
)
SignalR chat log out problem at layout pages
Object reference not set to an instance of an object