<%
' To check the existence of Master Tables in NREGA database !
Dim tblMaster(31)
tblMaster(1)="States"
tblMaster(2)="Districts"
tblMaster(3)="Blocks"
tblMaster(4)="Panchayats"
tblMaster(5)=" s"
tblMaster(6)="Exe_Agency"
tblMaster(7)="Lang_Labels"
tblMaster(8)="Work_Category"
tblMaster(9)="Work_Present_Status"
tblMaster(10)="Work_Proposed_Status"
tblMaster(11)="Work_Status"
tblMaster(12)="Work_Type"
tblMaster(13)="Fin_Year"
tblMaster(14)="Month_Master"
tblMaster(15)="Material_Master"
tblMaster(16)="Banks"
tblMaster(17)="Bank_Master"
tblMaster(18)="Branch_Master"
tblMaster(19)="Education_Master"
tblMaster(20)="JobAssigned_Master"
tblMaster(21)="Block_Master"
tblMaster(22)="Panchayat_Master"
tblMaster(23)="Panchayat_Account"
tblMaster(24)="Exp_Master"
tblMaster(25)="Wrk_Act_Master"
tblMaster(26)="MPRwork_cat"
tblMaster(27)="RelationsBPL"
tblMaster(28)="complain_sub_cat"
tblMaster(29)="complaint_category"
tblMaster(30)="Scheme_dptt_master"
i=1
No_of_Missing_Tables = 0
while i <= 30
strSQL="Select Count(Name) As Num from SysObjects where name='" & tblMaster(i) & "' and xtype='U'"
Set objRs = Server.CreateObject("ADODB.Recordset")
objRs.Open strSQL,objcon,1,1
if objRs("Num") = 0 then
No_of_Missing_Tables = No_of_Missing_Tables + 1
if No_of_Missing_Tables=1 then
Response.write "
Error !
"
end if
Response.write "
The Master Table '" & trim(tblMaster(i)) & "' NOT FOUND in the NREGA Database !
"
end if
i=i+1
wend
if No_of_Missing_Tables > 0 then
Response.write "
Kindly import the above missing Master Table(s) from the mdb downloaded from the site 'nrega.nic.in' !
"
Response.write "
Installation/Updation Process of Version-5 has been TERMINATED !
"
Response.write "
"
Response.End
end if
Install_reqd="N"
StrSql="Select Count(Name) As Num from SysObjects where name='Install' and xtype='U'"
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open strSQL,Objcon,1,1
if ObjRS("Num") = 0 then
Install_reqd="Y"
else
set objRS = Server.CreateObject("ADODB.Recordset")
strSQL="SELECT COLUMN_NAME from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME='Install' and column_name = 'Version'"
objRS.open strSQL,objCon
if objRS.eof then
Install_reqd="Y"
else
StrSql="Select Isnull(Install_Flag,'N') as Install_Flag, Isnull(version,'') as version,convert(varchar(10),installed_on,101) installed_on from Install"
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open strSQL,Objcon,1,1
if objRs.eof then
Install_reqd="Y"
elseif trim(UCASE(objRs("Install_Flag")))<>"Y" or trim(objRs("version")) <> "5.0" then
Install_reqd="Y"
end if
end if
end if
objRs.close
set objRs=nothing
objCon.close
set objCon=nothing
if Install_reqd="Y" then
Today=Day(Date) & "/" & Month(Date) & "/" & Year(Date)
%>
List of Approved Schemes
for Financial year-2012-13