Alpha DevCon 2018
Results 1 to 5 of 5

Thread: WAS not finding datbase from dialog

  1. #1
    Member Paul Velke's Avatar
    Real Name
    Paul Velke
    Join Date
    Jun 2005
    Location
    New Jersey
    Posts
    60

    Default WAS not finding datbase from dialog

    I have installed WAS and A5V6 on a server. I changed the database location from the C: drive to the D: drive, then published the project.

    Everything works great if I leave the WAS running from A5V6. If I close it and open just WAS instead, the grids seem to find the databases fine, but the aftervalidate code in the dialogs give me this error.

    Errors in: event.AfterValidate code:
    The system cannot find the file specified.
    service.DBF

    Thank You.

    One more thing in case it might help, I copied the entire database and project from my laptop. It was originally on the C: drive, and I put it in the same folder on the server, but on the D: drive.

  2. #2
    Alpha Software Employee Lenny Forziati's Avatar
    Real Name
    Lenny Forziati
    Join Date
    Nov 2001
    Location
    Alpha Software
    Posts
    4,660

    Default RE: WAS not finding datbase from dialog

    Paul, you need to use the path alias in your AfterValidate code.

    Instead of
    table.open("service")
    you should be using
    table.open([PathAlias.ADB_Path]"\service")

  3. #3
    Member Paul Velke's Avatar
    Real Name
    Paul Velke
    Join Date
    Jun 2005
    Location
    New Jersey
    Posts
    60

    Default RE: WAS not finding datbase from dialog

    That did it, thank you.

  4. #4
    Guest
    Real Name
    Gary Fletcher
    Join Date
    Apr 2000
    Posts
    162

    Default Re: WAS not finding datbase from dialog

    New person...simular problem. Am using a dialog component. In the a After Validate I have the following:

    session.web_id = time("MMddyy0h0m0s3",now())
    tbl = table.open("[pathalias.adb_path]\service_reporting-V2")
    tbl.enter_begin()
    tbl.web_id =session.web_id
    tbl.reportmonth =alltrim(reportmonth)
    tbl.First_name =alltrim(First_Name)
    tbl.Last_name =alltrim(Last_Name)
    tbl.Email =alltrim(Email)
    tbl.ReportDate =alltrim(ReportDate)
    tbl.Service_Hours=alltrim(Service_Hours)
    tbl.Commsvcmonth=alltrim(commsvcmth)
    tbl.SvcProj_Names=alltrim(Svcproj_Names)
    tbl.Meetings_Event_Hours=alltrim(Meetings_Event_Hours)
    tbl.Club_Events_Names=alltrim(Club_Events_Names)
    tbl.Clubhouse_Hours=alltrim(Clubhouse_Hours)

    tbl.enter_end(.t.)
    tbl.close()

    My alias is: [PathAlias.ADB_Path] = c:\a5\data\ecosvc

    Table name is: service_report-v2

    Here's the error I get when I press submit:

    Errors in: event.AfterValidate code:
    Error loading c:\a5\data\ecosvc\service_reporting-V2: The system cannot find the file specified.
    c:\a5\data\ecosvc\service_reporting-V2.DBF

    The table is in this location on the server. Does the upper/lower case have to be the same?

  5. #5
    Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,789

    Default Re: WAS not finding datbase from dialog

    I think you and I resolved this eariler, you call "service_reporting-V2" but the db name is "service_report-V2" later. Also, generally it's important to keep your names short, and I would caution about putting a dash/hyphen in any database or critical name.
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

Similar Threads

  1. Not Finding Next Record
    By Phil Rolf in forum Alpha Five Version 6
    Replies: 1
    Last Post: 02-09-2005, 05:32 AM
  2. finding records
    By geoff m in forum Alpha Five Version 5
    Replies: 5
    Last Post: 05-25-2004, 01:38 AM
  3. Finding Again
    By Mortie in forum Alpha Five Version 5
    Replies: 8
    Last Post: 03-28-2004, 09:30 AM
  4. Finding ?
    By Ray in forum Alpha Five Version 5
    Replies: 26
    Last Post: 03-26-2004, 06:37 PM
  5. Finding a msg ID number
    By Jean-P. B├ędard in forum Alpha Five Version 4
    Replies: 2
    Last Post: 05-25-2001, 08:28 AM

Bookmarks

Posting Permissions

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