Alpha Video Training
Results 1 to 24 of 24

Thread: Dialog component will not submit data to DBF table

  1. #1
    Member
    Real Name
    George Morley
    Join Date
    Jul 2005
    Location
    Harrisburg, Pa
    Posts
    31

    Default Dialog component will not submit data to DBF table

    I created a simple table using a DBF table. I followed the example in the videos on creating a dialog component.
    When I click on the button to submit to submit data to the table, nothing happens.
    I placed a debug(1) in Server Side - afterDialogValidate and as I step through I get 4 errors that reference
    Property not found e.rtc.a_sections sublement not found, Property not found e.fatalerror sublement not found, Property not found e.rtc.flag RecordWas Saved sublement not found, and Property not found e.htmlUpdateCommands sublement not found.

    Any suggestions as to what I may be doing wrong?

  2. #2
    Member
    Real Name
    Norman Mouton
    Join Date
    Aug 2010
    Posts
    103

    Default Re: Dialog component will not submit data to DBF table

    George


    I have the same issue. I however build another dialog connecting to an Access database and it worked. I however also want to use it with an Alpha Five database. Surely seems like a bug or unfinnished development. I am so excited with the endless possibilities using the new dialog, but sure wants to use the genies to speed up my job. Alpha gurus please help us

  3. #3
    "Certified" Alphaholic Lance Gurd's Avatar
    Real Name
    Lance Gurd
    Join Date
    Jun 2005
    Location
    Southampton, UK
    Posts
    1,422

    Default Re: Dialog component will not submit data to DBF table

    When V11 was in Beta the save data action script only saved to SQL tables and DBF's would be added. Not sure if this was ever done because it was at this point I started the arduous task of converting all my tables to SQL.

  4. #4
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,279

    Default Re: Dialog component will not submit data to DBF table

    If you want to submit to a .dbf you have to write your own code in the afterDialogValidate.

    The Server Side Action Scripting action to write the code for you to save to a table is only currently implemented for sql.

    However, to save data from a dialog to a table (in the case were you are saving to a single table) is pretty trivial.

    for example, say your dialog has fields call firstname, and lastname
    and you want to save to a table called 'mycustomers' which has fields called fname and lname

    you would write


    Code:
    dim t as p
    t = table.open("[PathAlias.ADB_Path]\mycustomers")
    dim r as p
    r.fname = e.datasubmitted.firstname
    r.lname = e.datasubmitted.lastname
    t.enter_record(r)
    t.close()

  5. #5
    Member
    Real Name
    Jim Coltz
    Join Date
    Oct 2005
    Location
    Western Pennsylvania
    Posts
    597

    Default Re: Dialog component will not submit data to DBF table

    Deleted

  6. #6
    Member
    Real Name
    Norman Mouton
    Join Date
    Aug 2010
    Posts
    103

    Default Re: Dialog component will not submit data to DBF table

    Selwyn
    Thaks for the reply. The code is understandable. The repeating columns is my problem. What will the code be for repeating columns. I have more than one project based on alpha five databases. The new dialog is stunning except for this hurdle.

  7. #7
    Member
    Real Name
    Norman Mouton
    Join Date
    Aug 2010
    Posts
    103

    Default Re: Dialog component will not submit data to DBF table

    Selwyn

    Does this means that with all new development sql connection will have priveledge? I have to know because I am only usingAlpha Five @ the moment with great success

  8. #8
    Member bob9145's Avatar
    Real Name
    Bob Senski
    Join Date
    Jun 2009
    Posts
    804

    Default Re: Dialog component will not submit data to DBF table

    Was this corrected? The current builders in data binding show dbf as an option? I have been unable to create a dialog component that will save to a DBF. It also does not bring up the debugger when this option is selected.

    Must you still hand code this as Selwyn suggests? Can some one get me up to speed on this?
    Tks
    Bob
    Last edited by bob9145; 04-04-2012 at 04:59 PM.

  9. #9
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,279

    Default Re: Dialog component will not submit data to DBF table

    Submitting a dialog and saving the data into a .dbf using server side action scripting works fine.

    You can see for yourself using the attached dialog which uses alphasports customer.dbf

    you will need to edit the data binding section in the dialog and fix the reference to the customer table since yours is likely not in c:\alphasports



    CustomerDialog_DBF.a5wcmp

  10. #10
    Member bob9145's Avatar
    Real Name
    Bob Senski
    Join Date
    Jun 2009
    Posts
    804

    Default Re: Dialog component will not submit data to DBF table

    Thank you

  11. #11
    Member bob9145's Avatar
    Real Name
    Bob Senski
    Join Date
    Jun 2009
    Posts
    804

    Lightbulb Re: Dialog component will not submit data to DBF table

    I found the solution to my problem. When using action scripting to enter the afterdialogvalidate event, "Save Submitted Data to Table(s)" the genie adds:

    ExecuteServerSideAction("Save Data::commitrecord")

    on a line before: function afterDialogValidate as v (e as p)

    function afterDialogValidate as v (e as p) must fire first because there is nothing in e.datasubmitted to commit until it fires.

    Putting the curser in the script after: function afterDialogValidate as v (e as p) solve the problem.

    The instructional video clearly demonstrates this however doesn't make specific mention of it. So when using the action scripting genie make sure to click in below this standard function.

    This I guess is pretty basic to coders but maybe it will help some one new to Alpha5. It sent me around the block a few times.


    Tks
    Bob

  12. #12
    "Certified" Alphaholic
    Real Name
    Jetson Lilibeth
    Join Date
    Dec 2011
    Posts
    1,083

    Default Re: Dialog component will not submit data to DBF table

    Quote Originally Posted by Selwyn Rabins View Post
    Submitting a dialog and saving the data into a .dbf using server side action scripting works fine.

    You can see for yourself using the attached dialog which uses alphasports customer.dbf

    you will need to edit the data binding section in the dialog and fix the reference to the customer table since yours is likely not in c:\alphasports



    CustomerDialog_DBF.a5wcmp
    Right,the dialog successfully submits every data entered, but on a lan, when the workstation submits data to the server, it produces the same error mentioned on the first post,
    Please try this Mr. Selwyn, and pelase suggest the solution for it. Thank you very much!
    Last edited by JetLi; 05-04-2012 at 01:56 AM.

  13. #13
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,279

    Default Re: Dialog component will not submit data to DBF table

    i don't really understand the point you are making. i am not sure what you mean by 'on a lan'.

    are you saying that when you run the dialog in working preview or live preview on your development machine, it works fine, but not when you publish the component to your server?

    can you make a video showing the error you are getting?

    i am pretty confident that submitting a dialog and saving the data in .dbf tables is working ok.

  14. #14
    "Certified" Alphaholic
    Real Name
    Jetson Lilibeth
    Join Date
    Dec 2011
    Posts
    1,083

    Default Re: Dialog component will not submit data to DBF table

    Local Area Network (LAN), Yes Selwyn, submitting on a Web dialog and saving data in .dbf tables is working fine, i have mentioned it in my other posts, Have you tried submitting a dialog and saving on a shadowed database? try that and put a debug(1) and you will get an error like the one in post #1.

    Errors= Property not found e.rtc.a_sections sublement not found, Property not found e.fatalerror sublement not found, Property not found e.rtc.flag RecordWas Saved sublement not found, and Property not found e.htmlUpdateCommands sublement not found.

  15. #15
    "Certified" Alphaholic
    Real Name
    Jetson Lilibeth
    Join Date
    Dec 2011
    Posts
    1,083

    Default Re: Dialog component will not submit data to DBF table

    Please show a solution for this. Thanks!

  16. #16
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,279

    Default Re: Dialog component will not submit data to DBF table

    I am now even more confused. 'shadow database' is for desktop application running on a lan. this is a web application. what relevance does 'shadow database' have here. 'shadow databases' are not relevant to web applications.

  17. #17
    "Certified" Alphaholic
    Real Name
    Jetson Lilibeth
    Join Date
    Dec 2011
    Posts
    1,083

    Default Re: Dialog component will not submit data to DBF table

    Sorry for the confusion, this is the Web thread.
    Selwyn, I suspect you are one of the developers of Alpha five, May I ask you a question, Can the Grid and the Dialog Component be used on desktop apps? You are not the one who is only confused here, even me, isnt it shadowing related to desktop? Can the Web Dialog component be used on desktop app? if not, then you are right, What relevance does shadow database have here? shadow databases are not relevant to web applications.

    Edited: You might escape the question, saying , this is the wrong thread to post desktop questions,please dont' because no replies in my post on the desktop part. You are right, If you look at the Desktop related thread, I was asking for additional info on the dialog component in saving when it is used in desktop, there were no replies because maybe the mods never used the dialog component on the desktop.I am able to use the grid and the dialog component on the DESKTOP and it is working very very very fine on a stand alone computer even if it is not published, can the data on the server be updated if i install the application in other machines on a local area network and try to save using the dialog component? YES OR NO. if no then case closed, if yes then what could be the code to submit it if it is on a workstation? the code on the server or stand alone to save is ExecuteServerSideAction("Save Data::commitrecord") .
    Last edited by JetLi; 05-05-2012 at 05:41 AM.

  18. #18
    Member SNusa's Avatar
    Real Name
    Robert Tupper
    Join Date
    Dec 2007
    Location
    Northeast, USA
    Posts
    893

    Default Re: Dialog component will not submit data to DBF table

    Jetson - Selwyn is one of the owners of the company..... (And the CTO - "Chief Technology Officer", unless I'm mistaken.)

    My "simple minded thoughts" here are: If he's confused (by your post/question)..... You're most likely confused too!
    Last edited by SNusa; 05-05-2012 at 12:02 AM.
    Robert T. ~ "I enjoy manipulating data... just not my data."
    It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
    RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

  19. #19
    "Certified" Alphaholic
    Real Name
    Jetson Lilibeth
    Join Date
    Dec 2011
    Posts
    1,083

    Default Re: Dialog component will not submit data to DBF table

    Yap Robert, I understand him maybe he is thinking that I'm doing things for the Web, because this is the web applications thread, and sorry for that because nobody is replying in the desktop post that I made that's why, when I saw this post and we are experiencing the same error,I replied with the hope that It will be cleared, at least I said it is working on a single computer contrary to the first post before ho found out the solution.

  20. #20
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,629

    Default Re: Dialog component will not submit data to DBF table

    Quote Originally Posted by JetLi View Post
    ... at least I said it is working on a single computer contrary to the first post before ho found out the solution.
    I bet that since your dialog points to the local table on the machine that you tested/developed on, when you copy it to a workstation w. a shadow db it can't work because it's looking for a local table. You might try to bind the dialog to the shadow. The only catch there is that the shadow would have to be in the exact same path on each machine.

  21. #21
    "Certified" Alphaholic
    Real Name
    Jetson Lilibeth
    Join Date
    Dec 2011
    Posts
    1,083

    Default Re: Dialog component will not submit data to DBF table

    Quote Originally Posted by Peter.Greulich View Post
    I bet that since your dialog points to the local table on the machine that you tested/developed on, when you copy it to a workstation w. a shadow db it can't work because it's looking for a local table. You might try to bind the dialog to the shadow. The only catch there is that the shadow would have to be in the exact same path on each machine.
    "You might try to bind the dialog to the shadow" - how is this possible?

  22. #22
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,629

    Default Re: Dialog component will not submit data to DBF table

    Quote Originally Posted by JetLi View Post
    "You might try to bind the dialog to the shadow" - how is this possible?
    Good question. It might not be. But the shadow is a table, albeit w. one record. Try it. If you don't see any fields then you know it can't be done.

  23. #23
    "Certified" Alphaholic Tim Kiebert's Avatar
    Real Name
    Tim Kiebert
    Join Date
    Jul 2004
    Location
    Geelong, Victoria, Australia
    Posts
    2,785

    Default Re: Dialog component will not submit data to DBF table

    Something else that may simplify things a bit. I would run the POS stations without shadowing. Ie just connect directly to the data files on the server. Shadowing is good if your users are opening many different forms repeatedly. This saves the layout definitions needing to be transferred over the network. However with a POS app each POS station usually just opens one or two forms once and they stay open. Plus with a good network ie gigabit and quality switches performance should not be that much slower if any.
    Tim Kiebert
    Eagle Creek Citrus
    A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

  24. #24
    Member
    Real Name
    Fodor Mihai
    Join Date
    Nov 2011
    Posts
    30

    Default Re: Dialog component will not submit data to DBF table

    Hello.

    Just wanted to say THANK YOU, Selwyn, for the solution to the DBF side of the problem.

    Mike.
    Last edited by zumik; 02-12-2013 at 06:51 AM.

Similar Threads

  1. Access DBF table data in dialog
    By russellhaggard in forum Application Server Version 10 - Web/Browser Applications
    Replies: 3
    Last Post: 08-06-2011, 04:33 PM
  2. Access DBF table in dialog
    By russellhaggard in forum Application Server Version 10 - Web/Browser Applications
    Replies: 8
    Last Post: 07-22-2011, 03:49 PM
  3. How to disable the submit button in a dialog component
    By irwincohen in forum Application Server Version 9 - Web/Browser Applications
    Replies: 0
    Last Post: 04-25-2011, 01:13 PM
  4. mysql data to web dialog component
    By Walter in forum Application Server Version 8
    Replies: 3
    Last Post: 04-03-2008, 06:48 PM
  5. Submit not working on Dialog Component
    By George Morley in forum Web Application Server v7
    Replies: 0
    Last Post: 11-16-2005, 06:40 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
  •