Re: question about Workspaces(0).OpenDatabase

From: DIOS (sindizzy.pak_at_softhome.net)
Date: 02/05/04


Date: Thu, 05 Feb 2004 06:12:31 GMT

Maybe you need to register them on the server.
Its only a guess.

AGP

-- 
**********************************************************************
Unpak my email address before sending me personal email
**********************************************************************
  "rocio" <rocio.katsanis@softwareservices.net> wrote in message news:uFujd506DHA.2480@TK2MSFTNGP12.phx.gbl...
  no, I'm not having problems accessing the mdb file, or using DAO. As a test I wrote a short VB6 program that uses the same lines of code to access the database, as well as the same user-defined functions, and it works.
  Be aware that, I have the source code and an executable for this application. I can run the exe file in my computer. But I cannot run the exe file in another server running only Windows 2003 server. My computer is the one I use to develop programs loaded with VB6, Office 2000, SQL, VB.NET, etc. While the server is only loaded with WIndows 2003 server. There are some files/components installed in my computer that obviously are not installed in the server and make the application failed at the server. But what are these components?
  Furthermore, in my computer, I cannot run the application from the source code because the application uses old 3rd party controls of which I aparently need licenses to use, and I don' have them. So when I look at the main form in design view within VB6, I see an empty form.
  I tried commenting out all the 3rd party control calls in the code just to be able to create another exe file from it to run it in the server, and yes, it runs in the server (I acn introduce msgbox statements here to see what the program is doing and it is opening the database correctly)
  This is why I believe there are some components/references missing in the server that are in my computer.
  Since at least can open the source code from within VB6 (code was developed with VB5), I looked at the components/references for this application, and copy the missing ones in the server from my computer.....still it does not work.
  Do not know what else to do.
  Tx!
    "DIOS" <sindizzy.pak@softhome.net> wrote in message news:h97Ub.177448$nt4.776786@attbi_s51...
    I would not use on error resume next. To make a directory that does not exist simply check
    for its existence like so
    If Dir(GetImagePath, vbdirectory) = "" then MkDir GetImagePath
    I think it works if you have a directory that ends in "\" or not.
    AGP
    -- 
    **********************************************************************
    Unpak my email address before sending me personal email
    **********************************************************************
      "Ruskin Hardie" <RuHardie@xtra.NOSPAM.co.nz> wrote in message news:DqVTb.33179$9k7.706662@news.xtra.co.nz...
      The reason you are getting an error of; "object required", is probably due to the first error of 'File Not Found' showing... If you can debug the code, trying stepping through. If the .OpenDatabase line gives you error 3024, then the issue is either with the file name of the 'mydbase.mdb' or the 'GetDatabasePath' function... It may pay to try returning the value of; GetDatabasePath (which I assume is a user defined function, as I am not familiar with this as a VB or DAO function.
      Alternatively, you could temporarily hard-code the full path, in the .OpenDatabase method and see if you have any problems.. You may also want to check what version of DAO you are running (under 'Project', 'References'... I think, although VB4 it may be under 'Tools'...).
        "rocio" <rocio.katsanis@softwareservices.net> wrote in message news:OSWhTip6DHA.2572@TK2MSFTNGP09.phx.gbl...
        Please I need your help below ......
          "Roger Carlson" <NO-carlsoro-SPAM@hotmail.com> wrote in message news:OMkktRp6DHA.1936@TK2MSFTNGP12.phx.gbl...
          This is more of a VB question than Access.  You do not need Access at all to open an Access database in VB.  You DO however need a reference to DAO (I don't know what version VB4 used) to be able to open a workspace and database object.
          I'd try asking this on a VB Newsgroup.
          -- 
          --Roger Carlson
            www.rogersaccesslibrary.com
            Reply to: Roger dot Carlson at Spectrum-Health dot Org
            "rocio" <rocio.katsanis@softwareservices.net> wrote in message news:OMqBz$o6DHA.1816@TK2MSFTNGP12.phx.gbl...
            I never developed and used Acess in the past, now I have to decode a program written in VB4 that accesses an Access db. I installed the program in a computer running windows server 2000 only (this is, ther is no Office programs installed), and when I try running the code it crashes with the message "File not Found", then another error message thta I can track from the src code of this application.
            It seems to crash when trying to load the main form of the app, Form_Load() . The statements here are:
                ' open the assessment number and name database
                Set dbPhotobase = Workspaces(0).OpenDatabase(GetDatabasePath & "mydbase.mdb")
                Set rsPhotoval = dbPhotobase.OpenRecordset("photoval", dbOpenDynaset)
                Set rsImages = dbPhotobase.OpenRecordset("images", dbOpenDynaset)
                
                ' create the images directory if it does not exist
                On Error Resume Next
                MkDir Left$(GetImagePath, Len(GetImagePath) - 1)
                
                ' this is static
                usrCurrentImage.strPath = GetImagePath
                Exit Sub
            err_Form_Load:
                ' unload the program if the database is not accessible
                MsgBox "Could not start Photobase: " & Err.Description, vbCritical, APP_TITLE
                End
            the error message I get (that comes from the err_Form section above) is:
                  Could not start Photobase: object required
            my guess is, since I do not have Microsoft Office installed in this computer, maybe I'm missing some Access objects that will enable Workspaces to open this database? Or, do I need to have Access install in order to run this piece of code?
            Hope you can help on this one.....


Relevant Pages

  • Re: Changing a 0 to No
    ... "fredg" wrote: ... I link to a database table on our ... >> server and users have to enter yes or no in one of the fileds. ... > I do not reply to personal email. ...
    (microsoft.public.access.reports)
  • Re: merge multiple databases
    ... Unpak my email address before sending me personal email ... I will keep the same table structure in the new database. ... >> AGP ...
    (microsoft.public.vb.general.discussion)
  • Re: merge multiple databases
    ... Unpak my email address before sending me personal email ... I will keep the same table structure in the new database. ... >> AGP ...
    (microsoft.public.access.queries)
  • Re: merge multiple databases
    ... Unpak my email address before sending me personal email ... I will keep the same table structure in the new database. ... >> AGP ...
    (microsoft.public.vb.database.dao)
  • Re: expression error
    ... > the selected county. ... > other forms in the database and the VB code is the same. ... It may be VB code but it's not Access VBA code. ... I do not reply to personal email. ...
    (microsoft.public.access.formscoding)