Anda di halaman 1dari 6

GMEHS :- 9768093742,9272506749,9271351567

11279
saiganesha22@gmail.com
Create Check for Database Updates
http://www.frendz4m.com/p/forum/showthreads.php?forumID=13&subforumID=0&ID=20667
22&start=7380
Received the Fees of RS. xxxxx by xxxxxx on behalf of your ward xxxxxxxx
9094 tyba
Arts
Work Experience
Fourth Tulsi Siddam Roll 9
BGKINI
Fast speed while fetching VWAtt
Delete Data before updating Exam Type
Check ExamTypeOrder in Daily Observation Notebook

AB
Not in include '-'
http://www.freevoipnews.com/free_phone_service/
http://www.youtube.com/watch?v=lpBN-BBhcew&feature=relmfu

ANTHREX1988

Private Sub cmdGenerate1_Click()


Call OpenConnection
gblConn.Execute "Delete from TmpExmConsReport"
Dim strA As String, rsA As New ADODB.Recordset
Dim strETA As String
Dim strTH As String
Dim strPO As String
Dim strPETA As String
Dim strValTH As String
Dim strValPO As String
Dim strTHSP As String
Dim strPOSP As String
Dim strValTHSP As String
Dim strValPOSP As String
strA = "select distinct SD.InstituteID,Sub.SubjectID,SD.BranchID,Sd.AccYearI
D,SD.StandardID,S.StandardName,SD.DivisionID,D.DivisionName,SD.StudentDetailsID,
SD.ExamSeatNo,ltrim(rtrim(isnull(SD.FirstName,'') + ' ' + ltrim(rtrim(isnull(SD.
FathersName,'') + ' ' + isnull(SD.LastName,''))))) as FullName,Sub.SubjectName,S
ub.SubjectOrder" & _
" from comTrnStudentDetails as SD" & _
" inner join ExmTrnStudentMarksEntry as SME on SME.StudentDetailsID=S
D.StudentDetailsID" & _
" inner join ComMstStandard as S on S.StandardID=SD.StandardID" & _
" full join ComMstDivision as D on D.DivisionID=SD.DivisionID" & _
" inner join ComMstSubject as Sub on Sub.SubjectID=SME.SubjectID" & _
" inner join ExmMstExamination as E on E.ExaminationID=SME.Examinatio
nID" & _
" inner join ExmMstExaminationType as ET on ET.ExamTypeID=SME.ExamTyp
eID" & _
" where SD.StudentDetailsID is not null and SME.IsIncludedTotal='Y' a
nd SD.ExamSeatNo='00001' and SD.AccYearID=2 and SD.StandardID=5" & _
" order by SD.ExamSeatNo,Sub.SubjectName"
rsA.Open strA, gblConn
If rsA.EOF = False Then
While rsA.EOF = False
strTHSP = ""
strPETA = ""
strETA = ""
strTH = ""
strPO = ""
strValTH = ""
strValPO = ""
strPOSP = ""
strValTHSP = ""
strValPOSP = ""

Dim strA1 As String, rsA1 As New ADODB.Recordset


Dim strCV As String
Dim strCVOF As String
Dim strCN As String
strCV = ""
strCVOF = ""
strCN = ""
strA1 = "select distinct E.ExaminationAbbreviation,E.PrintOrder,ETA.
ExaminationID" & _
" from comTrnStudentDetails as SD" & _
" inner join ExmTrnExaminationTypeAllocation as ETA on ETA.S
tandardID=SD.StandardID" & _
" inner join ExmMstExamination as E on E.ExaminationID=ETA.E
xaminationID" & _
" where SD.StudentDetailsID is not null and ETA.SubjectID='"
& rsA!SubjectID & "' and ETA.IsSelected='Y' and SD.AccYearID='" & rsA!AccYearID
& "' and SD.StandardID='" & rsA!StandardID & "' and SD.StudentDetailsID='" & rs
A!StudentDetailsID & "' and ETA.IsIncludedTotal='Y'" & _
" order by E.PrintOrder "
rsA1.Open strA1, gblConn
If rsA1.EOF = False Then
While rsA1.EOF = False
If strPETA = "" Or strPETA <> rsA1!ExaminationAbbreviation T
hen
If strETA = "" Then
strETA = rsA1!ExaminationAbbreviation
Else
strETA = strETA & " " & rsA1!ExaminationAbbrevia
tion
End If
strPETA = rsA1!ExaminationAbbreviation
End If
Dim strA2 As String, rsA2 As New ADODB.Recordset
strA2 = "select cast(round(ObtainedMarks,5)as numeric(18,0))
as Obt_Marks,AllottedMarks" & _
" from ExmTrnStudentMarksEntry as SME" & _
" inner join ExmMstExaminationType as ET on ET.ExamT
ypeID=SME.ExamTypeID" & _
" where StudentDetailsID='" & rsA!StudentDetailsID &
"' and ExaminationID='" & rsA1!ExaminationID & "' and IsIncludedTotal='Y' and S
ubjectID='" & rsA!SubjectID & "' and ExamTypeAbbreviation='TH'"
rsA2.Open strA2, gblConn
If rsA2.EOF = False Then
If strTH = "" Then
If rsA2!AllottedMarks <> 0 Then
strTH = rsA2!AllottedMarks
strCVOF = val(strCVOF) + val(rsA2!AllottedMarks)
Else
strTH = " * "
End If
strTHSP = "strTH"
Else
If rsA2!AllottedMarks <> 0 Then
strTH = strTH & " " & rsA2!AllottedMarks
strCVOF = val(strCVOF) + val(rsA2!AllottedMarks)
Else
strTHSP = "strTH"
strTH = strTH & " " & " * "
End If
End If
If strValTH = "" Then
If rsA2!Obt_Marks <> 0 Then
strValTH = rsA2!Obt_Marks
strCV = val(strCV) + val(rsA2!Obt_Marks)
Else
strValTH = " * "
strValTHSP = "strValTH"
End If
Else
If rsA2!Obt_Marks <> 0 Then
strValTH = strValTH & " " & rsA2!Obt_Marks
strCV = val(strCV) + val(rsA2!Obt_Marks)
Else
strValTH = strValTH & " " & " * "
strValTHSP = "strValTH"
End If
End If
Else
If strTH = "" Then
strTH = " "
strTHSP = " "
Else
strTH = strTH & " " & " "
strTHSP = " "
End If
If strValTH = "" Then
strValTH = " "
strValTHSP = " "
Else
strValTH = strValTH & " " & " "
strValTHSP = " "
End If
End If
rsA2.Close
strA2 = "select cast(round(ObtainedMarks,5)as numeric(18,0))
as Obt_Marks,AllottedMarks" & _
" from ExmTrnStudentMarksEntry as SME" & _
" inner join ExmMstExaminationType as ET on ET.ExamT
ypeID=SME.ExamTypeID" & _
" where StudentDetailsID='" & rsA!StudentDetailsID &
"' and ExaminationID='" & rsA1!ExaminationID & "' and IsIncludedTotal='Y' and S
ubjectID='" & rsA!SubjectID & "' and ExamTypeAbbreviation='PO'"
rsA2.Open strA2, gblConn
If rsA2.EOF = False Then
If strPO = "" Then
If rsA2!AllottedMarks <> 0 Then
strPO = rsA2!AllottedMarks
strCVOF = val(strCVOF) + val(rsA2!AllottedMarks)
Else
strPO = " * "
strPOSP = "strPO"
End If
Else
If rsA2!AllottedMarks <> 0 Then
strPO = strPO & " " & rsA2!AllottedMarks
strCVOF = val(strCVOF) + val(rsA2!AllottedMarks)
Else
strPO = strPO & " " & " * "
strPOSP = "strPO"
End If
End If
If strValPO = "" Then
If rsA2!Obt_Marks <> 0 Then
strValPO = rsA2!Obt_Marks
strCV = val(strCV) + val(rsA2!Obt_Marks)
Else
strValPO = " * "
strValPOSP = "strValPO"
End If
Else
If rsA2!Obt_Marks <> 0 Then
strValPO = strValPO & " " & rsA2!Obt_Marks
strCV = val(strCV) + val(rsA2!Obt_Marks)
Else
strValPO = strValPO & " " & " * "
strValPOSP = "strValPO"
End If
End If
Else
If strPO = "" Then
strPO = " "
strPOSP = " "
Else
strPO = strPO & " " & " "
strPOSP = " "
End If
If strValPO = "" Then
strValPO = " "
strValPOSP = " "
Else
strValPO = strValPO & " " & " "
strValPOSP = " "
End If
End If
rsA2.Close
rsA1.MoveNext
Wend
End If
rsA1.Close
If val(strCVOF) <> 0 Then
strCVOF = Round(val((val(strCV) * 100) / val(strCVOF)), 0)
End If
strCV = strCV & " " & strCVOF & " " & vbCrLf
If strTHSP = " " Then
strTH = strTH & vbCrLf
End If
If strValTHSP = " " Then
strValTH = strValTH & vbCrLf
End If
If strPOSP = " " Then
strPO = strPO & vbCrLf
End If
If strValPOSP = " " Then
strValPO = strValPO & vbCrLf
End If
If Trim$(strTH) = "" Then
strTH = vbCrLf
End If
If Trim$(strValTH) = "" Then
strValTH = vbCrLf
End If
If Trim$(strValPO) = "" Then
strValPO = vbCrLf
End If
If Trim$(strPO) = "" Then
strPO = vbCrLf
End If
If Trim$(strCV) = "" Then
strCV = vbCrLf
End If
strCN = "Tot AVG GRC"
Dim strSP As String
strSP = "Insert into TmpExmConsReport values('" & rsA!InstituteID &
"','" & rsA!BranchID & "','" & rsA!AccYearID & "','" & rsA!StandardID & "','" &
FormatText(rsA!StandardName) & "','" & rsA!DivisionID & "','" & FormatText(rsA!D
ivisionName) & "','" & rsA!StudentDetailsID & "','" & rsA!ExamSeatNo & "','" & F
ormatText(rsA!FullName) & "','" & IIf(IsNull(rsA!SubjectOrder), 0, rsA!SubjectOr
der) & "','" & FormatText(rsA!SubjectName) & "','" & strETA & "','" & strTH & "'
,'" & strPO & "','" & strCN & "','" & strValTH & "','" & strValPO & "','" & strC
V & "','')"
gblConn.Execute strSP
rsA.MoveNext
Wend
End If
rsA.Close
Call CloseConnection
End Sub
End If
rsA.Close
Call CloseConnection
End Sub