Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7647685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:31:29+00:00 2026-05-31T10:31:29+00:00

I have a particular situation where my client require to import (periodically) an ms-access

  • 0

I have a particular situation where my client require to import (periodically) an ms-access database into his mysql website database (so it’s a remote database).

Because the hosting plan is a shared hosting (not a vps), the only way to do it is through PHP through an SQL query, because I don’t have ODBC support on hosting.

My current idea is this one (obviusly the client has a MS-Windows O.S.):

  • Create a small C# application that convert MS-Access database into a big SQL query written on a file
  • The application will then use FTP info to send the file into a specified directory on the website
  • A PHP script will then run periodically (like every 30 minutes) and check if file exists, eventually importing it into the database

I know it’s not the best approach so I’m proposing a question to create a different workaround for this problem. The client already said that he wants keep using his ms-access database.

The biggest problem I have is that scripts can last only 30 seconds, which is obviusly a problem to import data.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T10:31:30+00:00Added an answer on May 31, 2026 at 10:31 am

    To work around the 30-second limit, call your script repeatedly, and keep track of your progress. Here’s one rough idea:

    if(!file_exists('upload.sql')) exit();
    
    $max = 2000; // the maximum number you want to execute.
    
    if(file_exists('progress.txt')) {
        $progress = file_get_contents('progress.txt');
    } else {
        $progress = 0;
    }
    
    // load the file into an array, expecting one query per line
    $file = file('upload.sql');
    
    foreach($file as $current => $query) {
        if($current < $progress) continue; // skip the ones we've done
        if($current - $progress >= $max) break; // stop before we hit the max
        mysql_query($query);
    }
    
    // did we finish the file?
    if($current == count($file) - 1) {
        unlink('progress.txt');
        unlink('upload.sql');
    } else {
        file_put_contents('progress.txt', $current);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a particular situation: a service started by a broadcast receiver starts an
In my particular situation, I have a couple of solutions to my problem. I
I have a situation where particular elements (xs:simpleType, xs:complexType) are placed in the output
Here's the situation: On a particular branch, some changes have been merged in from
In a particular situation I need to have variable (character array or std:string) where
Here's my particular situation... I have a decent amount of experience with webforms, and
I'm looking into situations in database-oriented web applications when one should rely on client
I'm currently working on some performance critical code, and I have a particular situation
The JQuery has method effectively selects all elements where they have particular descendants. I
I have a particular PHP page that, for various reasons, needs to save ~200

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.