Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Count byte when insert into database

Author  Topic 

nthphuong
Starting Member

5 Posts

Posted - 2002-10-23 : 08:25:17
Hi all,

Please guide me how to count size of per record when insert into database ! I'm using MS-SQL

Thanks in advanced,

Nguyen Hieu Phuong

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2002-10-23 : 08:58:26
Estimating the Size of a Table

Edited by - Page47 on 10/23/2002 08:59:55
Go to Top of Page

nthphuong
Starting Member

5 Posts

Posted - 2002-10-23 : 09:07:43
I understand what you guide.

But my problem that I have an application and I must provide quota for each user in my application. User there is not database user, I store them in a table. Therefore I have to calculate size of each record when insert/update/delete.

Any ideal will be greatly appreciated!

Thanks,
Hieu Phuong


Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-10-23 : 09:14:17
It would be a lot easier for you to limit the number of ROWS the user can store, instead of trying to determine the actual size of each row. You can also use the full rowsize and divide that into the number of bytes the user is supposed to have.

BTW, are you allowing the users to store files inside the database itself? If you are, then forget it. You'll go crazy trying to determine how much space they're using. You can more easily and flexibly store files on the hard drive and take advantage of the file system's ability to set quotas.

Go to Top of Page
   

- Advertisement -