CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Filter results from an Excel sheet?

    Unless you have 5 or LESS users (at least with the old versions) They would corrupt DB files with 6 or 7 concurrent requests. Everything went down, until the DB was rebuilt.

    This is from the old days, when we used it. We'd rebuild BEFORE each run.

    Code:
    Option Explicit
    
    Private Sub Form_Load()
    ' Set Reference to Microsoft Jet Runtim Object (JRO)
    '  BROWSE if not found: \program files\common files\system\ado\msjro.dll
      CompactAndRepair (db$)
    End Sub
    
    
    Sub CompactAndRepair(db$)
      Dim jro As jro.JetEngine, xn$
      Set jro = New jro.JetEngine
      Screen.MousePointer = vbHourglass
      xn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\"
      jro.CompactDatabase xn & db, xn & db & "-2"
      If Len(Dir(App.Path & "\" & db & "-2")) > 0 Then
        Kill App.Path & "\" & db
        Do While Len(Dir(App.Path & "\" & db)) > 0
          DoEvents               ' wait for delete
        Loop
        Name App.Path & "\" & db & "-2" As App.Path & "\" & db
        Do While Len(Dir(App.Path & "\" & db)) = 0
        DoEvents        ' wait for copy to complete
        Loop
    End If
    Screen.MousePointer = vbDefault
    End Sub
    Last edited by dglienna; December 21st, 2011 at 07:18 PM.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  2. #17
    Join Date
    Dec 2011
    Posts
    3

    Re: Filter results from an Excel sheet?

    Here we can import the list of records from excel to MDB/SQL Server, If we uses the Microsoft ActiveX Data Objects 2.7/2.8 Library to connect to SQL Or Access, we can filter and manage the n number of records. After Importing the list into the datebase, as per your requirement you filter/sort the data, after processing on data make a proper reporting of records and that report (filtered data) can be exported to excel again. This filtered excel/records can be mail to end user using vb 6.0 itself.

  3. #18
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Filter results from an Excel sheet?

    ??? How did that help?
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  4. #19
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: Filter results from an Excel sheet?

    Not much, I'm afraid.

    But you were also a little way off, David. As I understood the project, there would never be more than ONE user accessing the database, because the OP wanted to send the program together with the database to each user. There is no remote accessing the database via internet.

    If he wanted internet access all the concept of doing it with VB6 would fail anyway. You'd possibly do the app in ASP.NET then and create a database with SQL as you proposed.

  5. #20
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Filter results from an Excel sheet?

    GoDaddy has has Access DB for anyone for the last *forever* period. Added SQL and others after that. You'd be surprised how many tables are available for *anyone* to see...
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Page 2 of 2 FirstFirst 12

Tags for this Thread

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

Featured