Results 1 to 11 of 11

Thread: Installing a program

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    May 2004
    Location
    Granby, Qc, Canada
    Posts
    602

    Installing a program

    I created a program using the Date reserved word. When I install it on another computer, it says "Can't find object librairies or modules". I installed VB to see what's the problem, and it's crashing on the line using Date. I compared and they both have the same references.

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    May 2004
    Location
    Granby, Qc, Canada
    Posts
    602

    Re: Installing a program

    That's weird, each time I try to open a table in MS Access, it pop up an "Unknown" error. So I can't access my DB with my program.

  3. #3
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Installing a program

    is ms access installed on the other machine? and the same version as yours?

    pete

  4. #4

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Installing a program

    Quote Originally Posted by Gensor
    ...I installed VB to see what's the problem, and it's crashing on the line using Date. I compared and they both have the same references.
    If the other system now has vb installed, did you also install the service pack too?
    But like Martin suggested, create an installation package using the P&D Wizard or other installer program.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  6. #6
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Installing a program

    If Date is used in a query as the name of a field, surround it with brackets [Date] and it should still work.

  7. #7
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Installing a program

    Quote Originally Posted by dglienna
    If Date is used in a query as the name of a field, surround it with brackets [Date] and it should still work.
    Did you read the question? How could the value of a date cause the app to crash on one PC but not another?

  8. #8
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Installing a program

    How about it's a bad practice, that warrants trouble?

  9. #9
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: Installing a program

    Yes it can be considered bad practice. But you still have not explained yourself to the thread starter. Can you give us a bad example and a good example of what you're talking about, then we will all see the light and will be happy.


    Woof

  10. #10
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Installing a program

    How about from the M$ website?
    Reserved words have a specific meaning to Access or to the Microsoft Jet database engine. If you use a reserved word or symbol, you may receive an error.
    -D
    DATABASE
    DATE
    DATETIME
    DELETE
    DESC
    Description
    DISALLOW
    DISTINCT
    DISTINCTROW
    Document
    DOUBLE
    DROP

    http://support.microsoft.com/kb/q286335/

    And, like I said, if you have a field named as one of the reserved words, to avoid problems with the DB engine, you can simply use [ ] brackets around it, in which case the DB engine will know that it is not to be interpreted as a reserved word.
    VB Code:
    1. rsUsers.Open "SELECT [Name] [Date] FROM Users;", cnAP, adOpenDynamic, adLockPessimistic
    would be better than
    VB Code:
    1. rsUsers.Open "SELECT Name Date FROM Users;", cnAP, adOpenDynamic, adLockPessimistic

  11. #11
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Installing a program

    Looks like your missing the point dave.

    If the program was opened in the VB IDE on the target system and stepped through as the thread starter states,
    it is crashing on a line containing a reference to Date. It is not stated that it is even being used in a query.
    Not to mention that if that was the case then it would cause an issue on ALL systems and not just a particular one,
    at least until the brackets were implemented.

    Also, since the thread starter can not even open the db from Access suggests that the issue is related to
    something completely different then the bracket solution.

    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

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