473,400 Members | 2,163 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

compress file

1
Hi everyone actually i wanna compress the access file at run time in vb6.0 so plz help me out
Jun 4 '07 #1
3 1814
sashi
1,754 Expert 1GB
Hi there,

Run a simple search on google, look for "Huffman Encoding". Very useful when it comes to compress/decompress files. Good luck & Take care.

Hi everyone actually i wanna compress the access file at run time in vb6.0 so plz help me out
Jun 4 '07 #2
Killer42
8,435 Expert 8TB
Hi everyone actually i wanna compress the access file at run time in vb6.0 so plz help me out
My guess is you actually wanted to do the Access "compact and repair" thing - right?

If so, I'm pretty sure NeoPa posted some info about this in the Access (or possibly VB) forum some months back. I'll try to track it down for you.
Jun 4 '07 #3
ansumansahu
149 100+
Hi everyone actually i wanna compress the access file at run time in vb6.0 so plz help me out
Hi ,

If you want to compact the database look at this piece of code.

---------------------------------------------------------------------------

' PROCEDURE : CompactDB
' DESCRIPTION :
' RETURN VALUE: true or false depending wether there were errors or not
' NOTE :
' Add "Microsoft Jet and Replication Objects 2.x Library" to
' the references of your project
' EXAMPLE :
'---------------------------------------------------------------------------

Public Function CompactDB(pFileName As String) As Boolean
On Error GoTo ErrH
Dim CONN As New JRO.JetEngine
Dim ConnstringSorg As String, ConnstringDest As String

' Ensure file is not read only
SetAttr pFileName, vbNormal
ConnstringSorg = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
pFileName & ";User ID=;Password=;"
ConnstringDest = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
App.Path & "\Temp.mdb" & ";Jet OLEDB:Engine Type=5;"

Screen.MousePointer = vbHourglass
CONN.CompactDatabase ConnstringSorg, ConnstringDest
Screen.MousePointer = vbDefault

'Copia il file compattato.
Kill pFileName
FileCopy App.Path & "\Temp.mdb", pFileName
Kill App.Path & "\Temp.mdb"

Set CONN = Nothing
CompactDB = True
Exit Function
ErrH:
Screen.MousePointer = vbDefault
Debug.Print Err.Description
End Function
-----------------------------------------------------------------------------------------

-ansuman sahu
Jun 4 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Tony | last post by:
Hello, Any assistance would be appreciated: As the subject suggests I am trying to gunzip files using the Compress::Zlib module. The following is basically the code that I am working with: ...
0
by: Santastp | last post by:
Hi! This is a situation who can happen often and I would like to know if something exist. I try to create an application who use XML as a native database. The problem is that I don't want...
1
by: Marc Jennings | last post by:
Hi there, I have a problem in that I need to de-compress a file that was compressed using the UNIX compress command. The resulting filename is helloworld.xml.Z I have looked at SharpZipLib,...
5
by: ad | last post by:
I used use SharpZipLib to compress files in disk. But now I want to compress stream into another stream in memory(the stream not associated with disk file) My pseudo is: Stream...
5
by: Jigar Mehta | last post by:
Hye Friends!!, Happy New Year!! I am Jigar Mehta from India. Currently I am working on a project in which I need to compress some images on the harddisk... I want to make an engine that reads...
8
by: Jose L. Velazquez | last post by:
Hi all, I have made a webservice that returns an XML, but sometimes the connection is so slow and there is a lot of data to be returned. I would like to know if it is possible to send this data...
6
by: Champika Nirosh | last post by:
Hi, I have two machine where I needed to have a extended TCP/IP protocol to make the link between the two machines Mean,I need to write a application that compress every data the machine send...
1
by: ironpythonster | last post by:
Hi everyone, this should be a quick question. I am writing a function to compress the Jpeg file,with the API Image.Save(...) . the code as follow that: public static void Save(string...
6
by: =?Utf-8?B?V2F5bmUgR29yZQ==?= | last post by:
Hi I want to achive 2 things. First I would like to compress an existing file on my harddrive. I can easily find out if a file is compressed or not by using "File.GetAttributes". But no matter...
0
by: vampire1986 | last post by:
Hi all. I have project compress file using C#. I'm using name space IO.Compression and i saw this code on Internet but it is compress to file bigger than source file. Can you help me, please.Thanks...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.