Results 1 to 20 of 20

Thread: VB6 with Access in Local Network (LAN)

Hybrid View

  1. #1
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: VB6 with Access in Local Network (LAN)

    Well with a database that size, first thing I'd do is reconsider using something else other than Access... the next thing I'd do is check the code where you are selecting data... are you running queries like this? SELECT* FROM SOMETABLE .... with no where clause? If you are... don't. you should only be selecting the cols you need, and only the rows you need... otherwise all of that data has to come down over the network. That would be the next thing to look at... network traffic... how stable it the network? blah, blah blah...

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Sep 2012
    Posts
    17

    Angry Re: VB6 with Access in Local Network (LAN)

    I see some programms.. that working properly and it use same exe for node and server... its working same speed in node and server... how can i write an same exe for node and server.

  3. #3
    gibra
    Guest

    Re: VB6 with Access in Local Network (LAN)

    Quote Originally Posted by sha123 View Post
    I see some programms.. that working properly and it use same exe for node and server... its working same speed in node and server... how can i write an same exe for node and server.
    I have made programs VB6.0 + Access (database) that run for years in multi-user (LAN and Terminal Server) without any problem. Some even with 15 concurrent users.
    My suggestions here:

    1)
    This problem is due to cache updating, that in JET has been changed. The default time refresh occur each 5 minutes.
    Therefore, if you read data immediately after updating, the data seem no changed.

    You need to force the refresh of the cache after each UPDATE or INSERT SQL command (or ADODB.Recordset Update methods, also):


    Code:
        ' note that Microsoft Jet And Replication Objects Library 2.6 need installed.
        ' library file: MSJRO.DLL (however already installed on most of systems)
        '
        ' CN is the ADODB.Connection 
    
        Dim Jet As Object
        On Error Resume Next
        Set Jet = CreateObject("JRO.JetEngine")
        If Not Jet Is Nothing Then
             Jet.RefreshCache CN
        End If

    After refresh cache, you get the updated data immediately.
    I.e., to get the ID set as counter field (Autoincrement) for last added record:

    Code:
    First use the above code, then inquire to get the new ID 
    Set rs = CN.Execute ("SELECT @@IDENTITY AS newID FROM MyTable")

    2) you do not need to use Winsock to access the data.


    3) In multi-user environment it is necessary to implement a strong control about concurrency. See:
    Using Optimistic Concurrency
    http://msdn.microsoft.com/en-us/libr...cz(VS.80).aspx


    4) Wher INSER or UPDATE data, use always Transactions!!!


    5) Compact and Backup database every day.


    You can downlaod my project that contains a complete application-template (starting from LOGIN) where you can see many of above feature.
    I use classes to access database (Get and Save methods)
    Unfortunately for you, my page is on italian language, but the source code is VB6.0.
    http://nuke.vbcorner.net/Progetti/VB...T/Default.aspx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width