Answered by:
how to solve load testing

Question
-
User942041713 posted
I am using multiple logins at a time to my application ,but it seems it stops working after some time.
I am using MS Access as a backend and use oledb connection for database connection.
also closing it every time
wht will be the solution for that
Tuesday, August 31, 2010 4:53 AM
Answers
-
User-1199946673 posted
but it seems it stops working after some timeyou'll need to provide more information?
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, August 31, 2010 7:21 AM -
User-1199946673 posted
How to solve such problemYou only describe your application in general. The only thing we know you're using an Access database using an oledb connection, and that all of a sudden it isn't working anymore. You don't show any code, you don't give us any error, so how would we possibly know what's your problem, let alone that we're able to solve it? You seem to think the problem is related to Access, why?
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, September 1, 2010 2:25 AM -
User-1199946673 posted
what to do on server side or do i have to modify my code and how?To determine if there's something wrong with your code, we first need to see your code....
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, September 1, 2010 2:49 AM
All replies
-
User-1199946673 posted
but it seems it stops working after some timeyou'll need to provide more information?
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, August 31, 2010 7:21 AM -
User942041713 posted
Yes,
I have asp.net Intranet page with many applications running at a time e.g. Servicee request and all
For that I have created login and password page .Each has to login to visit my intranet page.
I am using database for that (MS Access) .
After some time it stops working,not a single page is opening which has database connection
I am usind OLEDB dataconnection
How to solve such problem
Namrata
Tuesday, August 31, 2010 11:56 PM -
User-1199946673 posted
How to solve such problemYou only describe your application in general. The only thing we know you're using an Access database using an oledb connection, and that all of a sudden it isn't working anymore. You don't show any code, you don't give us any error, so how would we possibly know what's your problem, let alone that we're able to solve it? You seem to think the problem is related to Access, why?
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, September 1, 2010 2:25 AM -
User942041713 posted
No ,it is not Access problem.
Today application is running .I think it is bcoz server is not able to handle that much load
It gives error at the line where connection opens(that mean server is not able to open the connection)
what to do on server side or do i have to modify my code and how?
I can show the server side log:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 8/31/2010 11:57:33 AM
Event time (UTC): 8/31/2010 6:27:33 AM
Event ID: d4e4b780ff904d018b0c8872cab389cf
Event sequence: 1482
Event occurrence: 45
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/Root/home-5-129277025711093750
Trust level: Full
Application Virtual Path: /home
Application Path: E:\home\
Machine name: VCSERVER
Process information:
Process ID: 6492
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: OleDbException
Exception message: Unspecified error
Request information:
Request URL: http://192.168.1.2/home/Default.aspx
Request path: /home/Default.aspx
User host address: 192.168.1.65
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\NETWORK SERVICE
Thread information:
Thread ID: 8
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OleDb.OleDbConnection.Open()
at ASP.default_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in E:\home\Default.aspx:line 543
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.Page.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Wednesday, September 1, 2010 2:42 AM -
User-1199946673 posted
what to do on server side or do i have to modify my code and how?To determine if there's something wrong with your code, we first need to see your code....
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, September 1, 2010 2:49 AM -
User942041713 posted
<%@ Page Debug="true"%>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Configuration"%>
<%@ Import Namespace="System.Data.Oledb" %>
<%@ Import Namespace="System.Data.OleDb.OleDbDataAdapter" %><script runat="server">
Sub page_load(ByVal o As Object, ByVal e As EventArgs)
Dim Conn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0; Data Source=c:\database\home.accdb")
Conn.Open()
Dim qs, sql As String
qs = Request("app")
'' Dim a As Array
''a = Split(qs, "@")
sql = "select * from staff where deluser=0 and pass='" & Application(qs) & "' and email='" & qs & "'"
'' sql = "select * from client where pass='" & Application(qs) & "' and email='" & qs & "'"
Dim cmd As New OleDbCommand(sql, Conn)
Dim rec As OleDbDataReader
rec = cmd.ExecuteReader
While rec.Read
rname.Text = rec("fname") & " " & rec("lname")
If Not rec("company").ToString.Length = 0 Then
company.Text = rec("company")
End If
email.Text = rec("email")
If Not rec("contact").ToString.Length = 0 Then
contact.Text = rec("contact")
End If
End While
Conn.Close()
End Sub
Protected Sub category1(ByVal obj As Object, ByVal e As EventArgs)
Dim sub_IT() As String = {"select option", "Network problems", "Wireless connection", "CPU not working", "UPS not working", "Other"}
Dim sub_admin() As String = {"select option", "Dusting & cleaning", "Garbage removal", "small electrical problems", "Drinking water", "Parking", "Security issues", "Other"}
Dim sub_accounts() As String = {"select option", "Invoices", "Receipts", "Payments", "Other"}
Dim sub_ac() As String = {"select option", "AC/remote servicing", "AC/remote repair", "Other"}
Dim sub_fur() As String = {"select option", "door lock", "fixing chair", "keys", "Other"}
Dim sub_ele() As String = {"select option", "new points", "major electrical faults", "Other"}
Dim sub_hr() As String = {"select option", "Other"}
Dim sub_recep() As String = {"select option", "Other"}
Dim sub_lab() As String = {"select option", "Other"}
Dim sub_oth() As String = {"select option", "Other"}
Dim sub_plumb() As String = {"select option", "drainage", "leakage", "Other"}
Dim sub_civil() As String = {"select option", "false ceiling", "water seepage", "water stagnation", "Other"}
If category.SelectedValue = "ICT" Then
sub_cat.DataSource = sub_IT
sub_cat.DataBind()
sub_cat.Visible = True
ElseIf category.SelectedValue = "Admin" Then
sub_cat.DataSource = sub_admin
sub_cat.DataBind()
sub_cat.Visible = True
ElseIf category.SelectedValue = "Accounts" Then
sub_cat.DataSource = sub_accounts
sub_cat.DataBind()
sub_cat.Visible = True
ElseIf category.SelectedValue = "Furniture" Then
sub_cat.DataSource = sub_fur
sub_cat.DataBind()
sub_cat.Visible = True
ElseIf category.SelectedValue = "Electrical jobs" Then
sub_cat.DataSource = sub_ele
sub_cat.DataBind()
sub_cat.Visible = True
ElseIf category.SelectedValue = "AC" Then
sub_cat.DataSource = sub_ac
sub_cat.DataBind()
sub_cat.Visible = True
ElseIf category.SelectedValue = "Civil work" Then
sub_cat.DataSource = sub_civil
sub_cat.DataBind()
sub_cat.Visible = True
ElseIf category.SelectedValue = "Other" Then
sub_cat.DataSource = sub_oth
sub_cat.DataBind()
sub_cat.Visible = True
ElseIf category.SelectedValue = "Plumbing" Then
sub_cat.DataSource = sub_plumb
sub_cat.DataBind()
sub_cat.Visible = True
ElseIf category.SelectedValue = "Reception" Then
sub_cat.DataSource = sub_recep
sub_cat.DataBind()
sub_cat.Visible = True
ElseIf category.SelectedValue = "HR" Then
sub_cat.DataSource = sub_hr
sub_cat.DataBind()
sub_cat.Visible = True
ElseIf category.SelectedValue = "Lab block service" Then
sub_cat.DataSource = sub_lab
sub_cat.DataBind()
sub_cat.Visible = True
End If
End Sub
Sub s1(ByVal o As Object, ByVal e As EventArgs)
Dim Conn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0; Data Source=c:\database\home.accdb")
Conn.Open()
Dim qs As String
qs = Request("app")
Dim RandomGenerator As Random
Dim intRandomNumber As Integer
RandomGenerator = New Random()
intRandomNumber = RandomGenerator.Next(1, 10000)
Dim dt, rid, rid1 As String
dt = Year(Now()) & Now.ToString("MM") & Now.ToString("dd")
rid = dt & intRandomNumber.ToString
rid1 = rid
Dim sql As String
Dim c, c1, c3 As Int16
c = 0
c3 = 0
sql = "select * from staff where pass='" & Application(qs) & "'"
'' Dim cmd As New OleDbCommand(sql, Conn)
'' Dim rec As OleDbDataReader
'' rec = cmd.ExecuteReader
Dim ct As Date
ct = Month(Now()) & "/" & Day(Now()) & "/" & Year(Now())
'' While rec.Read
''c = c + 1
'' c3 = 1
'' End While
Dim sub_cat As String
sub_cat = ""
'' Dim cmd1 As New OleDbCommand(sql, Conn)
'' Dim rec1 As OleDbDataReader
''rec1 = cmd1.ExecuteReader
''While rec1.Read
''c1 = c1 + 1
'' c3 = 2
''End While
Dim prob As String
prob = Request("prob")
prob = Replace(prob, "'", "")
prob = Replace(prob, "(", "")
prob = Replace(prob, ")", "")
If Not Request("email") = "" Then
If Not Request("category") = "" Then
sql = "insert into request(ID,rname,category,sub_cat,prob,cdate,email,contact,company,status,dnt_shw,priority) values('" & rid1 & "','" & Request("rname") & "','" & Request("category")
If Request("sub_cat") = "select option" Then
sub_cat = ""
End If
sql = sql & "','" & sub_cat & "','" & prob & "',#" & ct & "#,'" & Request("email") & "','" & Request("contact") & "','" & Request("company") & "','" & "New" & "','" & "0" & "','" & Request("rd1") & "')"Dim cmd2 As New OleDbCommand(sql, Conn)
cmd2.ExecuteNonQuery()
Response.Redirect("thnk_for_req.aspx?app=" & qs)
''Response.Write(sql)
'' Else
''Response.Redirect("invalid.aspx")
End If
Else
Response.Redirect("invalid.aspx")
End If
Conn.Close()
End Sub
Sub r12(ByVal o As Object, ByVal e As EventArgs)
prob.Value = ""
''category.Text = ""
''sub_cat.Text = ""
End Sub
</script>
<html><head>
<style>
.style3
{
font-family: Verdana;
height: 28px;
font-size: x-small;
font-weight: bold;
}
.style4
{
font-family: Verdana;
font-size: x-small;
}
.style6
{
width: 149px;
font-family: Verdana;
font-size: small;
font-weight: bold;
background-color: #FFFF99;
}
.style8
{
color: #000000;
width: 831px;
}
#problem
{
width: 517px;
height: 140px;
}
.style9
{
font-size: x-small;
}
.style10
{
height: 28px;
}
.style11
{
width: 149px;
font-family: Verdana;
font-size: x-small;
font-weight: bold;
background-color: #FFFF99;
}
.style12
{
width: 831px;
}
#prob
{
width: 697px;
height: 83px;
}
.style13
{
color: #000000;
}
.style14
{
font-family: Verdana;
font-size: x-small;
font-weight: bold;
background-color: #3366CC;
}
.style15
{
background-color: #CCCCCC;
}
.style16
{
font-family: Verdana;
font-size: xx-small;
background-color: #CCCCCC;
}
.style17
{
font-family: Verdana;
font-size: xx-small;
}
</style>
</head>
<table border=0 cellspacing=0 cellpadding=0 >
<td >
<a href="http://192.168.1.2/home/">
<img border=0 width=300 height=70 src=vclogo.jpg></td>
</tr>
</table>
<%
Dim qs As String
qs = Request("app")
Dim a As Array
a = Split(qs, "@")
If a(1) = "venturecenter.co.in" Then
%>
<%
If Request("app") = "admin@venturecenter.co.in" Then
%>
<table width=100%><tr><td width=75%><a href="employee2.aspx?app=<%=Request("app")%>" >
<span>VC Home </span> </a><span>>Service Request Form
</span></td><td>|<a href="per_req_ad.aspx?app=<%=qs %>">View all requests(Received)</a>|<a href="logout.aspx?app=<%=Request("app")%>"><span>Logout</span></a>
<span> </b></span></td></tr></table>
<% ElseIf Request("app") = "system@venturecenter.co.in" Then
%>
<table width=100%>
<tr><td width=75%><a href="employee2.aspx?app=<%=Request("app")%>" >
<span>VC Home </span> </a><span>>Service Request Form
</span></td><td>|<a href=" all requests(Received)</a>|<a href="logout.aspx?app=<%=Request("app")%>"><span>Logout</span></a>
<span> </b></span></td></tr></table>
<% ElseIf Request("app") = "account@venturecenter.co.in" Or Request("app") = "hr@venturecenter.co.in" Then
%>
<table width=100%><tr><td width=75%><a href="employee2.aspx?app=<%=Request("app")%>" >
<span>VC Home </span> </a><span>>Service Request Form
</span></td><td>|<a href="per_req_fin.aspx?app=<%=qs%>">view all requests(Received)</a> | <a href="logout.aspx?app=<%=Request("app")%>"><span>Logout</span></a>
<span> </b></span></td></tr></table>
<% ElseIf Request("app") = "reception@venturecenter.co.in" Then
%>
<table width=100%><tr><td width=75%><a href="employee2.aspx?app=<%=Request("app")%>" >
<span>VC Home </span> </a><span>>Service Request Form
</span></td><td>|<a href="per_req_recp.aspx?app=<%=qs%>">view all requests(Received)</a>|<a href="logout.aspx?app=<%=Request("app")%>"><span>Logout</span></a>
<span> </b></span></td></tr></table>
<% ElseIf Request("app") = "gm@venturecenter.co.in" Then
%>
<table width=100%><tr><td width=75%><a href="employee2.aspx?app=<%=Request("app")%>" >
<span>VC Home </span> </a><span>>Service Request Form
</span></td><td>|<a href="per_req.aspx?app=<%=qs%>">view all requests(Received)</a>|<a href="logout.aspx?app=<%=Request("app")%>"><span>Logout</span></a>
<span> </b></span></td></tr></table>
<%Else
%>
<table width=100%><tr><td width=85%><a href="employee2.aspx?app=<%=Request("app")%>" >
<span>VC Home </span> </a><span>>Service Request Form
</span></td><td>|<a href="logout.aspx?app=<%=Request("app")%>"><span>Logout</span></a>
<span> </b></span></td></tr></table>
<%End If
%>
<%Else%>
<table BORDER=0 WIDTH="100%" >
<tr>
<td width=85%><font size=2 face="Verdana"> <b><a href="client_home.aspx?app=<%=qs%>">VCServer></a>Service
Request Form</b></font></td><td>|<a href="logout.aspx?app=<%=qs%>">Logout</a></td>
</tr>
</table>
<%End If%>
<hr><body>
<form runat=server><table width=100% border=0 color=white style="border: thin solid #C0C0C0">
<tr>
<td>
Date</td>
<td>
<%=day(Now())%>/<%=month(Now())%>/<%=Year(Now())%></td>
</tr>
<tr>
<td>
Request by*</td>
<td>
<asp:textbox runat=server></asp:textbox>
</td>
</tr>
<tr>
<td>
Company name*</td>
<td>
<asp:textbox runat=server></asp:textbox>
</td>
</tr>
<tr>
<td>
Contact info</td>
<td>
<asp:textbox runat=server></asp:textbox></td>
</tr>
<tr>
<td>
Email*</td>
<td>
<asp:textbox runat=server ></asp:textbox> </td>
</tr>
<tr>
<td>
Category*</td>
<td><asp:DropDownList runat=server AutoPostBack=true>
<asp:ListItem Value="" Selected=True>Select Option</asp:ListItem>
<asp:ListItem Value="Civil work">Civil work</asp:ListItem>
<asp:ListItem Value="Admin">Admin</asp:ListItem>
<asp:ListItem Value="Electrical jobs">Electrical</asp:ListItem>
<asp:ListItem Value="ICT">IT</asp:ListItem>
<asp:ListItem Value="Accounts">Accounts</asp:ListItem>
<asp:ListItem Value="Furniture">Furniture</asp:ListItem>
<asp:ListItem Value="AC">AC</asp:ListItem>
<asp:ListItem Value="Reception">Reception</asp:ListItem>
<asp:ListItem Value="Lab block service">Lab block service</asp:ListItem>
<asp:ListItem Value="HR">HR</asp:ListItem>
<asp:ListItem Value="Other">Other</asp:ListItem>
</asp:DropDownList><asp:DropDownList runat=server Visible=false AutoPostBack=true>
<asp:ListItem Selected=True Value="">select option</asp:ListItem>
</asp:DropDownList></td>
</tr>
<tr>
<td>
Problem/Request *</td>
<td><textarea runat=server></textarea> <asp:RequiredFieldValidator runat="server" ControlToValidate="prob"
ErrorMessage="* You must enter the Request" Display="dynamic">
</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
Priority</td>
<td><asp:RadioButtonList runat=server RepeatDirection=Horizontal>
<asp:ListItem Value="High">High</asp:ListItem>
<asp:ListItem Value="Medium">Medium</asp:ListItem>
<asp:ListItem Value="Low">Low</asp:ListItem>
</asp:RadioButtonList></td>
</tr>
<tr>
<td>
</td>
<td>
<asp:Button runat=server Text="Submit"/>
(Note:-* compulsory fields) </td>
</tr></table>
<table><tr><td valign=top> </td><td style="font-family: Verdana; font-size: x-small">
<b>Service request sent:</b></td>
</tr></table>
<hr />
<table width=100%>
<tr><td width=6%>Date</td><td width=13%>Category</td>
<td width=10%>Status</td><td width=25%>Detail of the request</td>
<td width=20%>Comments from Receiver</td><td width=6%>Remove from your view</td><td width=6%>
Cancel your request</td></tr>
<% Dim Conn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0; Data Source=c:\database\home.accdb")
Conn.Open()
Dim qs, sql As String
qs = Request("app")
Dim a As Array
a = Split(qs, "@")
sql = "select * from request where email='" & qs & "' order by cdate DESC"
Dim cmd As New OleDbCommand(Sql, Conn)
Dim rec As OleDbDataReader
rec = cmd.ExecuteReader
Dim c As Int16
c = 0
Dim ct As Date
ct = Month(Now()) & "/" & Day(Now()) & "/" & Year(Now())
'' Response.Write(sql)
While rec.Read
c = c + 1
If Not rec("dnt_shw") = 1 Then
%>
<tr><td><span><%=Day(rec("cdate"))%></span>/<span
><%=month(rec("cdate"))%></span>/<span><%=Year(rec("cdate"))%></span></td>
<td><span><%=rec("category") %>-</span> <span
><%=rec("sub_cat") %></span></td>
<td><%=rec("status") %></td>
<td><%=rec("prob")%></td>
<td><%=rec("commnt")%></td>
<td><%If rec("status") = "Closed" Then%><a href="rmv_req.aspx?ID=<%=rec("ID")%>&app=<%=qs%>">Remove</a><%End If%> </td>
<td><a href="can_req.aspx?ID=<%=rec("ID")%>&app=<%=qs%>" >Cancel</a></td>
</tr>
<%
End If
End While
Conn.Close()
%>
</table>
<p>
<span>(<b>Note:</b> You can remove request/problem from your
view list by clicking remove link,when your request status will be closed.
</span>
<br />
<span>You can also cancel the request that you have already submitted by clicking cancel link)</span></p>
<p>
</p>
</form></body>
</html>Wednesday, September 1, 2010 2:53 AM -
User942041713 posted
<%@ Page Debug="true"%>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Configuration"%>
<%@ Import Namespace="System.Data.Oledb" %>
<%@ Import Namespace="System.Data.OleDb.OleDbDataAdapter" %><script runat="server">
Sub page_load(ByVal o As Object, ByVal e As EventArgs)
Dim Conn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0; Data Source=c:\database\home.accdb")
Conn.Open()
Dim qs, sql As String
qs = Request("app")
'' Dim a As Array
''a = Split(qs, "@")
sql = "select * from staff where deluser=0 and pass='" & Application(qs) & "' and email='" & qs & "'"
'' sql = "select * from client where pass='" & Application(qs) & "' and email='" & qs & "'"
Dim cmd As New OleDbCommand(sql, Conn)
Dim rec As OleDbDataReader
rec = cmd.ExecuteReader
While rec.Read
rname.Text = rec("fname") & " " & rec("lname")
If Not rec("company").ToString.Length = 0 Then
company.Text = rec("company")
End If
email.Text = rec("email")
If Not rec("contact").ToString.Length = 0 Then
contact.Text = rec("contact")
End If
End While
Conn.Close()
End Sub
Protected Sub category1(ByVal obj As Object, ByVal e As EventArgs)
Dim sub_IT() As String = {"select option", "Network problems", "Wireless connection", "CPU not working", "UPS not working", "Other"}
Dim sub_admin() As String = {"select option", "Dusting & cleaning", "Garbage removal", "small electrical problems", "Drinking water", "Parking", "Security issues", "Other"}
Dim sub_accounts() As String = {"select option", "Invoices", "Receipts", "Payments", "Other"}
Dim sub_ac() As String = {"select option", "AC/remote servicing", "AC/remote repair", "Other"}
Dim sub_fur() As String = {"select option", "door lock", "fixing chair", "keys", "Other"}
Dim sub_ele() As String = {"select option", "new points", "major electrical faults", "Other"}
Dim sub_hr() As String = {"select option", "Other"}
Dim sub_recep() As String = {"select option", "Other"}
Dim sub_lab() As String = {"select option", "Other"}
Dim sub_oth() As String = {"select option", "Other"}
Dim sub_plumb() As String = {"select option", "drainage", "leakage", "Other"}
Dim sub_civil() As String = {"select option", "false ceiling", "water seepage", "water stagnation", "Other"}
If category.SelectedValue = "ICT" Then
sub_cat.DataSource = sub_IT
sub_cat.DataBind()
sub_cat.Visible = True
ElseIf category.SelectedValue = "Admin" Then
sub_cat.DataSource = sub_admin
sub_cat.DataBind()
sub_cat.Visible = True
ElseIf category.SelectedValue = "Accounts" Then
sub_cat.DataSource = sub_accounts
sub_cat.DataBind()
sub_cat.Visible = True
ElseIf category.SelectedValue = "Furniture" Then
sub_cat.DataSource = sub_fur
sub_cat.DataBind()
sub_cat.Visible = True
ElseIf category.SelectedValue = "Electrical jobs" Then
sub_cat.DataSource = sub_ele
sub_cat.DataBind()
sub_cat.Visible = True
ElseIf category.SelectedValue = "AC" Then
sub_cat.DataSource = sub_ac
sub_cat.DataBind()
sub_cat.Visible = True
ElseIf category.SelectedValue = "Civil work" Then
sub_cat.DataSource = sub_civil
sub_cat.DataBind()
sub_cat.Visible = True
ElseIf category.SelectedValue = "Other" Then
sub_cat.DataSource = sub_oth
sub_cat.DataBind()
sub_cat.Visible = True
ElseIf category.SelectedValue = "Plumbing" Then
sub_cat.DataSource = sub_plumb
sub_cat.DataBind()
sub_cat.Visible = True
ElseIf category.SelectedValue = "Reception" Then
sub_cat.DataSource = sub_recep
sub_cat.DataBind()
sub_cat.Visible = True
ElseIf category.SelectedValue = "HR" Then
sub_cat.DataSource = sub_hr
sub_cat.DataBind()
sub_cat.Visible = True
ElseIf category.SelectedValue = "Lab block service" Then
sub_cat.DataSource = sub_lab
sub_cat.DataBind()
sub_cat.Visible = True
End If
End Sub
Sub s1(ByVal o As Object, ByVal e As EventArgs)
Dim Conn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0; Data Source=c:\database\home.accdb")
Conn.Open()
Dim qs As String
qs = Request("app")
Dim RandomGenerator As Random
Dim intRandomNumber As Integer
RandomGenerator = New Random()
intRandomNumber = RandomGenerator.Next(1, 10000)
Dim dt, rid, rid1 As String
dt = Year(Now()) & Now.ToString("MM") & Now.ToString("dd")
rid = dt & intRandomNumber.ToString
rid1 = rid
Dim sql As String
Dim c, c1, c3 As Int16
c = 0
c3 = 0
sql = "select * from staff where pass='" & Application(qs) & "'"
'' Dim cmd As New OleDbCommand(sql, Conn)
'' Dim rec As OleDbDataReader
'' rec = cmd.ExecuteReader
Dim ct As Date
ct = Month(Now()) & "/" & Day(Now()) & "/" & Year(Now())
'' While rec.Read
''c = c + 1
'' c3 = 1
'' End While
Dim sub_cat As String
sub_cat = ""
'' Dim cmd1 As New OleDbCommand(sql, Conn)
'' Dim rec1 As OleDbDataReader
''rec1 = cmd1.ExecuteReader
''While rec1.Read
''c1 = c1 + 1
'' c3 = 2
''End While
Dim prob As String
prob = Request("prob")
prob = Replace(prob, "'", "")
prob = Replace(prob, "(", "")
prob = Replace(prob, ")", "")
If Not Request("email") = "" Then
If Not Request("category") = "" Then
sql = "insert into request(ID,rname,category,sub_cat,prob,cdate,email,contact,company,status,dnt_shw,priority) values('" & rid1 & "','" & Request("rname") & "','" & Request("category")
If Request("sub_cat") = "select option" Then
sub_cat = ""
End If
sql = sql & "','" & sub_cat & "','" & prob & "',#" & ct & "#,'" & Request("email") & "','" & Request("contact") & "','" & Request("company") & "','" & "New" & "','" & "0" & "','" & Request("rd1") & "')"Dim cmd2 As New OleDbCommand(sql, Conn)
cmd2.ExecuteNonQuery()
Response.Redirect("thnk_for_req.aspx?app=" & qs)
''Response.Write(sql)
'' Else
''Response.Redirect("invalid.aspx")
End If
Else
Response.Redirect("invalid.aspx")
End If
Conn.Close()
End Sub
Sub r12(ByVal o As Object, ByVal e As EventArgs)
prob.Value = ""
''category.Text = ""
''sub_cat.Text = ""
End Sub
</script>
<html><head>
<style>
.style3
{
font-family: Verdana;
height: 28px;
font-size: x-small;
font-weight: bold;
}
.style4
{
font-family: Verdana;
font-size: x-small;
}
.style6
{
width: 149px;
font-family: Verdana;
font-size: small;
font-weight: bold;
background-color: #FFFF99;
}
.style8
{
color: #000000;
width: 831px;
}
#problem
{
width: 517px;
height: 140px;
}
.style9
{
font-size: x-small;
}
.style10
{
height: 28px;
}
.style11
{
width: 149px;
font-family: Verdana;
font-size: x-small;
font-weight: bold;
background-color: #FFFF99;
}
.style12
{
width: 831px;
}
#prob
{
width: 697px;
height: 83px;
}
.style13
{
color: #000000;
}
.style14
{
font-family: Verdana;
font-size: x-small;
font-weight: bold;
background-color: #3366CC;
}
.style15
{
background-color: #CCCCCC;
}
.style16
{
font-family: Verdana;
font-size: xx-small;
background-color: #CCCCCC;
}
.style17
{
font-family: Verdana;
font-size: xx-small;
}
</style>
</head>
<table border=0 cellspacing=0 cellpadding=0 >
<td >
<a href="http://192.168.1.2/home/">
<img border=0 width=300 height=70 src=vclogo.jpg></td>
</tr>
</table>
<%
Dim qs As String
qs = Request("app")
Dim a As Array
a = Split(qs, "@")
If a(1) = "venturecenter.co.in" Then
%>
<%
If Request("app") = "admin@venturecenter.co.in" Then
%>
<table width=100%><tr><td width=75%><a href="employee2.aspx?app=<%=Request("app")%>" >
<span>VC Home </span> </a><span>>Service Request Form
</span></td><td>|<a href="per_req_ad.aspx?app=<%=qs %>">View all requests(Received)</a>|<a href="logout.aspx?app=<%=Request("app")%>"><span>Logout</span></a>
<span> </b></span></td></tr></table>
<% ElseIf Request("app") = "system@venturecenter.co.in" Then
%>
<table width=100%>
<tr><td width=75%><a href="employee2.aspx?app=<%=Request("app")%>" >
<span>VC Home </span> </a><span>>Service Request Form
</span></td><td>|<a href=" all requests(Received)</a>|<a href="logout.aspx?app=<%=Request("app")%>"><span>Logout</span></a>
<span> </b></span></td></tr></table>
<% ElseIf Request("app") = "account@venturecenter.co.in" Or Request("app") = "hr@venturecenter.co.in" Then
%>
<table width=100%><tr><td width=75%><a href="employee2.aspx?app=<%=Request("app")%>" >
<span>VC Home </span> </a><span>>Service Request Form
</span></td><td>|<a href="per_req_fin.aspx?app=<%=qs%>">view all requests(Received)</a> | <a href="logout.aspx?app=<%=Request("app")%>"><span>Logout</span></a>
<span> </b></span></td></tr></table>
<% ElseIf Request("app") = "reception@venturecenter.co.in" Then
%>
<table width=100%><tr><td width=75%><a href="employee2.aspx?app=<%=Request("app")%>" >
<span>VC Home </span> </a><span>>Service Request Form
</span></td><td>|<a href="per_req_recp.aspx?app=<%=qs%>">view all requests(Received)</a>|<a href="logout.aspx?app=<%=Request("app")%>"><span>Logout</span></a>
<span> </b></span></td></tr></table>
<% ElseIf Request("app") = "gm@venturecenter.co.in" Then
%>
<table width=100%><tr><td width=75%><a href="employee2.aspx?app=<%=Request("app")%>" >
<span>VC Home </span> </a><span>>Service Request Form
</span></td><td>|<a href="per_req.aspx?app=<%=qs%>">view all requests(Received)</a>|<a href="logout.aspx?app=<%=Request("app")%>"><span>Logout</span></a>
<span> </b></span></td></tr></table>
<%Else
%>
<table width=100%><tr><td width=85%><a href="employee2.aspx?app=<%=Request("app")%>" >
<span>VC Home </span> </a><span>>Service Request Form
</span></td><td>|<a href="logout.aspx?app=<%=Request("app")%>"><span>Logout</span></a>
<span> </b></span></td></tr></table>
<%End If
%>
<%Else%>
<table BORDER=0 WIDTH="100%" >
<tr>
<td width=85%><font size=2 face="Verdana"> <b><a href="client_home.aspx?app=<%=qs%>">VCServer></a>Service
Request Form</b></font></td><td>|<a href="logout.aspx?app=<%=qs%>">Logout</a></td>
</tr>
</table>
<%End If%>
<hr><body>
<form runat=server><table width=100% border=0 color=white style="border: thin solid #C0C0C0">
<tr>
<td>
Date</td>
<td>
<%=day(Now())%>/<%=month(Now())%>/<%=Year(Now())%></td>
</tr>
<tr>
<td>
Request by*</td>
<td>
<asp:textbox runat=server></asp:textbox>
</td>
</tr>
<tr>
<td>
Company name*</td>
<td>
<asp:textbox runat=server></asp:textbox>
</td>
</tr>
<tr>
<td>
Contact info</td>
<td>
<asp:textbox runat=server></asp:textbox></td>
</tr>
<tr>
<td>
Email*</td>
<td>
<asp:textbox runat=server ></asp:textbox> </td>
</tr>
<tr>
<td>
Category*</td>
<td><asp:DropDownList runat=server AutoPostBack=true>
<asp:ListItem Value="" Selected=True>Select Option</asp:ListItem>
<asp:ListItem Value="Civil work">Civil work</asp:ListItem>
<asp:ListItem Value="Admin">Admin</asp:ListItem>
<asp:ListItem Value="Electrical jobs">Electrical</asp:ListItem>
<asp:ListItem Value="ICT">IT</asp:ListItem>
<asp:ListItem Value="Accounts">Accounts</asp:ListItem>
<asp:ListItem Value="Furniture">Furniture</asp:ListItem>
<asp:ListItem Value="AC">AC</asp:ListItem>
<asp:ListItem Value="Reception">Reception</asp:ListItem>
<asp:ListItem Value="Lab block service">Lab block service</asp:ListItem>
<asp:ListItem Value="HR">HR</asp:ListItem>
<asp:ListItem Value="Other">Other</asp:ListItem>
</asp:DropDownList><asp:DropDownList runat=server Visible=false AutoPostBack=true>
<asp:ListItem Selected=True Value="">select option</asp:ListItem>
</asp:DropDownList></td>
</tr>
<tr>
<td>
Problem/Request *</td>
<td><textarea runat=server></textarea> <asp:RequiredFieldValidator runat="server" ControlToValidate="prob"
ErrorMessage="* You must enter the Request" Display="dynamic">
</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
Priority</td>
<td><asp:RadioButtonList runat=server RepeatDirection=Horizontal>
<asp:ListItem Value="High">High</asp:ListItem>
<asp:ListItem Value="Medium">Medium</asp:ListItem>
<asp:ListItem Value="Low">Low</asp:ListItem>
</asp:RadioButtonList></td>
</tr>
<tr>
<td>
</td>
<td>
<asp:Button runat=server Text="Submit"/>
(Note:-* compulsory fields) </td>
</tr></table>
<table><tr><td valign=top> </td><td style="font-family: Verdana; font-size: x-small">
<b>Service request sent:</b></td>
</tr></table>
<hr />
<table width=100%>
<tr><td width=6%>Date</td><td width=13%>Category</td>
<td width=10%>Status</td><td width=25%>Detail of the request</td>
<td width=20%>Comments from Receiver</td><td width=6%>Remove from your view</td><td width=6%>
Cancel your request</td></tr>
<% Dim Conn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0; Data Source=c:\database\home.accdb")
Conn.Open()
Dim qs, sql As String
qs = Request("app")
Dim a As Array
a = Split(qs, "@")
sql = "select * from request where email='" & qs & "' order by cdate DESC"
Dim cmd As New OleDbCommand(Sql, Conn)
Dim rec As OleDbDataReader
rec = cmd.ExecuteReader
Dim c As Int16
c = 0
Dim ct As Date
ct = Month(Now()) & "/" & Day(Now()) & "/" & Year(Now())
'' Response.Write(sql)
While rec.Read
c = c + 1
If Not rec("dnt_shw") = 1 Then
%>
<tr><td><span><%=Day(rec("cdate"))%></span>/<span
><%=month(rec("cdate"))%></span>/<span><%=Year(rec("cdate"))%></span></td>
<td><span><%=rec("category") %>-</span> <span
><%=rec("sub_cat") %></span></td>
<td><%=rec("status") %></td>
<td><%=rec("prob")%></td>
<td><%=rec("commnt")%></td>
<td><%If rec("status") = "Closed" Then%><a href="rmv_req.aspx?ID=<%=rec("ID")%>&app=<%=qs%>">Remove</a><%End If%> </td>
<td><a href="can_req.aspx?ID=<%=rec("ID")%>&app=<%=qs%>" >Cancel</a></td>
</tr>
<%
End If
End While
Conn.Close()
%>
</table>
<p>
<span>(<b>Note:</b> You can remove request/problem from your
view list by clicking remove link,when your request status will be closed.
</span>
<br />
<span>You can also cancel the request that you have already submitted by clicking cancel link)</span></p>
<p>
</p>
</form></body>
</html>Wednesday, September 1, 2010 2:56 AM