filelen in VB6

Status
This thread has been Locked and is not open to further replies. The original thread starter may use the Report button to request it be reopened but anyone else with a similar issue should start a New Thread. Watch our Welcome Guide to learn how to use this site.

ansari1340

Thread Starter
Joined
Jun 12, 2005
Messages
4
Dears:
I have a problem in VB6 programming described as follows:
1-When I use the "filelen" command and the file size is over 2GB
compiler reply a minus number that is not correct .
2- When I use the "sqldmo.dll" in client can not backup from database
of sql server, but if sql be on client I can use backup .

Please advise me ,and thanks in advance for your cooperation .

Rgds.
Masoud Ansari
 
Joined
Oct 15, 2003
Messages
72
FileLen() returns a long integer which has a limit of 2Gb. Declare a double variable and use the size property of the file object (filesystemobject).

Dim fs As New FileSystemObject
Dim fi As File
Dim s As Double

Set fi = fs.GetFile("c:\autoexec.bat")
s = fi.Size
 
Status
This thread has been Locked and is not open to further replies. The original thread starter may use the Report button to request it be reopened but anyone else with a similar issue should start a New Thread. Watch our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top