Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Log-In Help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Log-In Help

    I have most likely a syntax issue I need some help with. I am
    working on a log in form and have followed the instructions in help as well as
    the forum.

    The error I receive is:

    Errors in: event.Form Level Validate code:
    error: lookup(c:\data\contacts - customers,Email="EMAIL ADDRESS.com",
    password) The system cannot find the file specified.
    c:\data\contacts - customers.DBF

    I do have the contacts - customers.dbf in my Data folder. I am using an email as the username.

    My Validate code is:

    if (User_Name = "") .or. (Password = "") then

    currentform.has_error = .t.

    currentform.error_message = "User name or password is blank."

    else

    dim correct_password as C

    correct_password = lookup("c:\data\contacts - customers", "Email="+quote
    (User_Name), "password")

    if (correct_password <> password) then

    currentform.has_error = .t.

    currentform.error_message = "Invalid user name or password."

    end if

    end if


    As always any assistance is greatly appreciated.

    Ken

  • #2
    Follow up

    My other form does point to the same DBF file and I can add a record via a form on line.

    My log in dialog is not finding that file and I have tried every variation in the lookup() that I can think of and I get the same message.

    I'm sure this is an easy thing to do and it is probably an easy fix but I'm darned if I can find it.

    Again, any help would be greatlyl appreciated.

    Comment


    • #3
      I'm a bit unclear as to what your lookupc() expression really looks like. Make sure you haven't hard-coded the path. And make sure you use the path alias. Here's an example:

      Code:
      lookupc("f", key, "Market", "[PathAlias.ADB_Path]\Avail_citystate","State_City")
      -Steve
      sigpic

      Comment


      • #4
        Ken,

        Are you publishing to localhost or to a server? If so, does it work if you run on localhost, but not on the server? Remember, the path to the data table has to be relative to the Alpha Web Server. If that's a server, then you'd have to have the c:\data directory on THAT server for it to work.

        Your lookup syntax is correct, except you should do as Steve said and make it lookup("[PathAlias.ADB_Path]\contacts - customers"...)

        And make sure this is in your Profile for the Alias:

        [PathAlias.ADB_Path] = =a5.get_path()

        One last thing, nothing to do with your question, and you don't have to follow - but you should get in the habit of naming your tables properly. Keep them short, and no embedded spaces or dashes. Your's has a split personality and can't decide if it holds contacts or customers. I assume both, but the terms are overlapping. You should pick one that is broad enough to cover its contents, but narrow enough to be obvious. The name should probably be either Contact or Customer (not plural). There are other reasons to keep it short when you start writing code to manipulate your components in the A5W page.
        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)

        Comment


        • #5
          Have you had any success?

          Have you had any success - I mean have you used the standard process yet, as per alpha sports samples and made it work?
          Insanity: doing the same thing over and over again and expecting different results.
          Albert Einstein, (attributed)
          US (German-born) physicist (1879 - 1955)

          Comment


          • #6
            Here's what happens....

            I am working off the Alpha Five server. I made the following changes to my validate code as suggested:

            correct_password = lookup("[PathAlias.ADB_Path]\Contacts - Customers", "Email="+quote(User_Name), "password")I have 2 Aliases; one identical to what you suggested and another one:

            [PathAlias.ADB_Path] = c:\data\_MYSERSVER_

            Here is what I get when I try it on line:


            Errors in: event.Form Level Validate code:
            error: lookup([PathAlias.ADB_Path]\Contacts - Customers,Email="Ken@Parksleepfly.Com",password) The system cannot find the path specified.
            \[PathAlias.ADB_Path]\Contacts - Customers.DBF



            Also- you have me dead to right on the naming of my tables. Though I am far from a programmer I do know better. I started dabbling and got too far in to change the name. Consider my wrist slapped- I deserved it.

            I appreciate the assistance.

            Ken

            Comment


            • #7
              Make sure you're using lookupc(), not lookup()

              You might also try this on another table with a name that meets naming standards. If you can get the lookupc() to work with the other table, then that confirms that your path alias is correct, and brings up the possibility that you'll need to reconsider your current table name.
              -Steve
              sigpic

              Comment


              • #8
                Ken, I'm going to assume you have two PROFILES, each with ONE alias named [PathAlias.ADB_Path]. You can't have two alias' with the same name for the same profile.

                Let's take a step back or we will be taking stabs in the dark. Tell us the following:
                • Where is Alpha Five full developer version installed, on the server or on a client computer connected to the server?
                • Where is your Alpha project database installed, on the server or on a client computer connected to the server?
                • When you open your project, what is the path to your Alpha project database?


                Steve is correct on the lookupc() and table name, but they are not required changes at this testing stage. I physically recreated your long table name and tested that it works fine, even with the embedded blanks and name length. Lookupc() is more effecient, but it would require you to take some extra steps that, right now, do not help your testing.
                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)

                Comment


                • #9
                  Answers I Hope

                  This is a project for myself. I have Alpha Five installed here. The project dbase is installed here and I have it uploaded on line. For the third question- I'm not sure how to answer this.

                  I did change the log in to Lookupc() and I got farther, but it said:

                  Errors in: event.Form Level Validate code:
                  Too few parameters.


                  How do I determine which Alias to delete or edit?

                  Thanks for your attention. I feel we're close. Once squared away will this make it so a person logging in see only their stuff?

                  Ken

                  Originally posted by Steve Wood
                  Ken, I'm going to assume you have two PROFILES, each with ONE alias named [PathAlias.ADB_Path]. You can't have two alias' with the same name for the same profile.

                  Let's take a step back or we will be taking stabs in the dark. Tell us the following:
                  • Where is Alpha Five full developer version installed, on the server or on a client computer connected to the server?
                  • Where is your Alpha project database installed, on the server or on a client computer connected to the server?
                  • When you open your project, what is the path to your Alpha project database?


                  Steve is correct on the lookupc() and table name, but they are not required changes at this testing stage. I physically recreated your long table name and tested that it works fine, even with the embedded blanks and name length. Lookupc() is more effecient, but it would require you to take some extra steps that, right now, do not help your testing.

                  Comment


                  • #10
                    Ken.

                    "Here" is not a suitable answer. I can't help you at this point.

                    No, completing this login phase will not make it so users only see their items. Its just the first step. You are going to have to step back and read the user guide on this subject. You need to understand filtering the grid using override code in the A5W page, protected variables, session variables.

                    I suggested you not attempt to replace lookup() with lookupc() at this time, it only complicated your task.
                    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)

                    Comment


                    • #11
                      How to make suitable.

                      How can I make my answer more suitable?

                      Dang, I kind of assumed there were more steps. I will definitely do the leg work to attempt this- until I hit a wall.

                      Comment


                      • #12
                        Sorry, did not mean to be so abrupt. I guess my question "Where" is just as non-specific as "here".

                        Let's try a different path, one at at time.

                        When you publish your web project, does the Publish dialog say, under Select Profile "Local Webroot"? Or something different?
                        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)

                        Comment


                        • #13
                          Path

                          No offense taken.

                          I can choose Local Webroot or my Server- which is what I would pick. I also use WS-FTP to upload files.

                          Originally posted by Steve Wood
                          Sorry, did not mean to be so abrupt. I guess my question "Where" is just as non-specific as "here".

                          Let's try a different path, one at at time.

                          When you publish your web project, does the Publish dialog say, under Select Profile "Local Webroot"? Or something different?

                          Comment


                          • #14
                            Update to my issue

                            I decided to rename the table (contacts - customers.dbf) to a members.dbf. My sign up form still works on line and plops a new record when it is filled and sent.

                            I am still having path issues though as I keep getting;

                            Error 3 - The system cannot find the path specified. \[PathAlias.ADB_Path]\Reviews.dbf

                            Steve has told me I can't have 2 Pathalias.ADBs but I don't know how to rectify this. Currently I have;

                            LocalRoot= [PathAlias.ADB_Path] = =a5.get_path()
                            AND
                            NAME= [PathAlias.ADB_Path] = c:\data\_MYSERVER_


                            For a brief time it was finding the table but now it isn't (problem is I don't know why it worked all of a sudden).

                            I feel this is probably easy to fix but I keep going in circles. Any halp would be greatly appreciated.

                            Thanks in advance

                            Ken

                            Comment


                            • #15
                              I said you could not have two assignments to the same variable in the same profile. Obviously you could/would have one per profile, each with a potentially different assignment.

                              If you contact me via email, I will offer to 'dial in' to your computer and take a look. Maybe we can fix this!
                              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)

                              Comment

                              Working...
                              X