<!--#include file ="../veriables.asp"-->
<%
Response.ContentType = "text/html" 
Response.Charset = "UTF-8" 
%>

<% 
Set hyldrm = Server.CreateObject("ADODB.Connection")
hyldrm = Server.MapPath("../db/"&datayol&".mdb")  
strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & hyldrm
%>
<!--#include file="head.asp"-->
<div class="block">
			
				<div class="block_head">
					<div class="bheadl"></div>
					<div class="bheadr"></div>
                    	<h2>Ver&#305;tabani</h2>						
				</div>		<!-- .block_head ends -->
				
				
				
				<div class="block_content">
  Burada veritaban&#305;n&#305;n  h&#305;zlanmas&#305; i&#231;in kü&#231;ültülüp onar&#305;l&#305;r.<br>
  Bu özellik zarar verilen veya bozulan veri taban&#305;n&#305; onar&#305;r.<br>
 </p>
<p>
<%
 	'Create an intence of the FSO object
 	Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
 	'Back up the database
 	objFSO.CopyFile hyldrm, Replace(hyldrm, ".mdb", "-yedek.mdb", 1, -1, 1)
 	Response.Write("Veritabanin yedegi aliniyor :&nbsp;<br /><span ><a>" & Replace(hyldrm, ".mdb", "-yedek.mdb", 1, -1, 1) & "</a></span><br />")
	'Create an intence of the JET engine object
	Set objJetEngine = Server.CreateObject("JRO.JetEngine")
	'Get the destination and name of the compacted database
	strCompactDB = Replace(hyldrm, ".mdb", "-atik.mdb", 1, -1, 1)
	'Compact database
	objJetEngine.CompactDatabase strCon, "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & strCompactDB
	'Display text that new compact db is created
	Response.Write("Bir kopyasi olusturuluyor:&nbsp;<br /><span ><a>" & strCompactDB & "</a></span><br />")
	'Release Jet object
	Set objJetEngine = Nothing
	'Delete old database
	objFSO.DeleteFile hyldrm
	'Display text that that old db is deleted
	Response.Write("Eski veritabani siliniyor:&nbsp;<br /><span ><a>" & hyldrm & "</a></span><br />")
	'Rename temporary database to old name
	objFSO.MoveFile strCompactDB, hyldrm
	'Display text that that old db is deleted
	Response.Write("Veritabani ismi degistiriliyor:&nbsp;<br /><span ><a>" & strCompactDB & "</a></span><br />")
	Response.Write("Yeniden adlandirilan veritabani:&nbsp;<br /><span ><a>" & hyldrm & "</a></span><br />")
	'Release FSO object
	Set objFSO = Nothing
	Response.Write("Veritabani yedeklendi ve kücültüldü:&nbsp;<br /><span ><a>" & hyldrm & "</a></span><br />")
    %></p>
 <p class="text">E&#287;er "kü&#231;ültme ve onarma" ba&#351;ar&#305;s&#305;zl&#305;kla sonu&#231;lan&#305;rsa yedek olarak '-yedek.mdb' olu&#351;turulacak.<br>Veritaban&#305; klasörünü filemanager'da görmek i&#231;in <a href="fIlemanager.asp?now=user&fold=in/db">t&#305;klay&#305;n</a>.</p>
</div>		<!-- .block_content ends -->
				
				<div class="bendl"></div>
				<div class="bendr"></div>
				
			</div>		<!-- .leftcol ends -->
            
            <!--#include file="foot.asp"-->