Print Page | Close Window

how to get database size

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=14635
Printed Date: 30 March 2026 at 9:36am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: how to get database size
Posted By: riya_singtel
Subject: how to get database size
Date Posted: 11 April 2005 at 3:38am
Is there any command that can give the size of an existing database? I am coding in Vbscript



Replies:
Posted By: Phat
Date Posted: 11 April 2005 at 5:18am
acces or sql?

Access use
long = FileLen(pathname)

Sql no idea.


Posted By: Gullanian
Date Posted: 11 April 2005 at 8:06am
Use FSO getSize if your using an Access database or know the location of the SQL Server database.

Search for "ASP FSO" in google.


Posted By: riya_singtel
Date Posted: 11 April 2005 at 11:08pm
I am using Access and coding in ASP VBScript
 
With FileLen it gives error Variable Undefined.
 
However I used:
 Set objFS = CreateObject("Scripting.FileSystemObject")
 Set objFile = objfS.GetFile(dbPath)
 len = objFile.Size
 
 and this one works fine.
Thanks to both of u.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net