Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

using VB to do data manipulation problem

Posted on 1999-07-15
1
Medium Priority
?
110 Views
Last Modified: 2010-05-02
My program is to use VB to do some data manipulation in Access database. What I did in VB code is simply run some predefined macros.(such as import text file into access table and export).Also, using DAO to execute some sql command. Sometimes, while the program runs, it has error message such as: the access database doesn't response, switch to it? Does anyone know what cause this kind of error?  Could be the database getting too big? What is size limitation for Access database?
Also, by the time, the database grows very big, I do some delete to clean up. After executing the 'delete' command, I suppose to compact the database. Should I use the compact method in VB? Or is there better way to do it? since the compact command requires to create a new DB based on old DB. I want to simply compact the old db in the VB code. Any suggestion?
0
Comment
Question by:llucy88
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 18

Accepted Solution

by:
deighton earned 120 total points
ID: 1524986
  ' clear residue database left if this routine has gone wrong.
    If Dir(App.Path & "\temp.mdb") <> "" Then
        Kill App.Path & "\temp.mdb"
    End If

    ' compact databse to spare database
    DBEngine.CompactDatabase sDataBase, App.Path & "\temp.mdb"
   
    ' move status bar
    frmAutograph.lblCompleteProgress.width = (iIncrement + 1) * (nWidth) / iTotalIncrement
   
    FileCopy App.Path & "\temp.mdb", sDataBase

    Kill App.Path & "\temp.mdb"
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question