Suneido

Integrated Application Platform

  • Home
  • Learning
    • Suneido Manual
    • Beginners
      • Inside Suneido
      • The Suneido Programming Language
      • The Suneido Database
      • Installing Suneido
      • Building Suneido
      • IDE Go To Tour
      • Upgrading To A New Release
    • Advanced
      • Canvas Control
      • DrawControl Part 1
      • DrawControl Part 2
      • DrawControl Part 3
      • SAX Like XML Processing
      • A Plug-In Architecture
      • A Simple Wizard Framework
      • An HTML Include Facility
      • An RSS 2 Feed Creator
      • MIME Generation
      • A New Add-on Facility
      • Workspace Improvement Hack
    • Mockito for Suneido
    • The Suneido Task Scheduler
    • Contributing To Suneido
    • Contributor Assignment of Copyright
    • Language Translation
    • Future Directions
    • Interview With Andrew Mckinlay
  • Forum
    • Announcements
    • Internals & Enhancements
    • Cookbook
    • General
  • FAQ
  • Screenshots
  • Downloads
  • Links

j_ferguson

  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 43 total)
1 2 3 →
  • Author
    Posts
  • June 3, 2019 at 1:27 pm in reply to: Read a file from where I left off #1467
    j_ferguson
    Moderator

    This is assuming you are using the same file object to read the file in both places and that you are not re-opening the file.

    June 3, 2019 at 1:24 pm in reply to: Call function inside function #1466
    j_ferguson
    Moderator

    It depends on how your functions are defined. If they are defined as global definitions in a library then you just have to make sure the name is capitalized and that you are spelling it correctly.

    If the function is dynamically defined, you need to keep in mind that functions do not have closure like blocks do in Suneido so you can’t do something like:

    a = function() { }
    b = function() { a() }
    b()

    If this does not answer your question, consider posting an example of what you are trying to do.

    October 16, 2017 at 9:19 am in reply to: Using Triggers #1340
    j_ferguson
    Moderator

    Hi Ajith,

    It shouldn’t matter when the trigger definition is created. I wonder if there is an error or exception happening that you are not noticing? If this continues to be a problem, you might consider attaching an export of your trigger definition as well a dump of the table the trigger is on.

    Thanks.

    October 13, 2017 at 8:53 am in reply to: Using Triggers #1338
    j_ferguson
    Moderator

    I also forgot to mention that if you are running client-server and you modify a trigger function, you may have to unload that trigger code on the server so that it re-loads your new code:

    ServerEval(‘Unload’, ‘Trigger_tmEmployees’)

    Or, you can use a brute-force method of restarting the Suneido server, that works too.

    October 13, 2017 at 8:44 am in reply to: Using Triggers #1337
    j_ferguson
    Moderator

    Hi Ajith,

    I tried the same thing on my copy and it worked even when I was using AccessControl to insert records. My table is a very simple table and I am running suneido.exe standalone.

    If you are running client-server, the trigger will be executing on the server side and the Inspect will not work as expected. In that case you could try using SuneidoLog, or writing to a file instead to debug your trigger.

    If you are running Suneido standalone, it is possible there is something about your table that is different from the simple one that I set up. Again, writing to a file (you can use the AddFile function for that), or SuneidoLog would be a better option for debugging than using Inspect in your trigger.

    I hope this helps you figure it out. If not, with a little more information we should be able to sort it out.

    November 23, 2015 at 12:12 pm in reply to: AccessGoto help #1228
    j_ferguson
    Moderator

    Hi Johan,

    It is most likely one of two things:

    1. Your Access query does not rename the field and you are passing the renamed field name
    2. the value may not be encoded properly for the lookup

    Take a look at AccessControl.AccessGoto method. You will see the Datadict encode is one of the first things that happens. If your datadict does not inherit from Field_num it is possible that it is not being encoded properly for the lookup. You might want to add some Print statements in this method to find out if the lookup queries are doing what you expect.

    December 5, 2014 at 7:34 pm in reply to: Key Control: not handling numbers #1120
    j_ferguson
    Moderator

    I have done some more testing and confirmed that some of our applications actually do use KeyControl with number fields and it is working.

    One thing to check is that you have the proper datadict class attached to your field and inherit from an appropriate base class that will do the proper encode for the data type you are using. For example, the field that I tested with defined the Control member as a KeyControl, and inherited from Field_number, which will ensure the values get encoded as numbers. When I switched the datadict class to inherit from Field_string, I saw behavior similar to what you described.

    December 5, 2014 at 6:19 pm in reply to: Key Control: not handling numbers #1119
    j_ferguson
    Moderator

    Looking at the code for the control, it appears it is trying to handle data types other than string. I will have a closer look and let you know what I find.

    November 19, 2014 at 3:22 pm in reply to: modes for import #1075
    j_ferguson
    Moderator

    Hi Ajith,

    Look in the User’s Manual under Database > Reference > Transaction, and Database > Reference > Query.

    When you do a request like QueryDelete or QueryDo, it is using a brand new transaction even though it isn’t completely apparent. When you do this and the transaction overlaps with your .t transaction you open up opportunity for transaction conflicts. Without getting into all the details about what exactly causes conflicts, I would suggest you try to use the transaction you already have rather that starting new ones to do requests. Again, if you look at the references in the User’s Manual above you will hopefully find methods you can use within the transaction (.t) that you have rather than doing QueryDelete or QueryDo.

    Hope that helps

    November 19, 2014 at 3:02 pm in reply to: A curious quote #1117
    j_ferguson
    Moderator

    Hi Ajith,

    That behavior is a bit curious. It looks like it is assuming the one quote is the beginning of the string you are going to set doAdmn to. It seems if you are setting a column to a string in queryview, the last quote is not needed.

    If you query the table after the request, you’ll see it is not setting the value properly.

    If you want to set the field to a variable date you could use the following:

    QueryDo(‘update dengueMaha where dateAdmn = “1.8.13 P” set doAdmn = ‘ $ Display(Date(day:1, month:8, year: 2013)))

    If you are just setting to a date constant you can do:

    update dengueMaha where dateAdmn = “1.8.13 P” set doAdmn = #20130801

    November 13, 2014 at 3:33 pm in reply to: Please Help #1116
    j_ferguson
    Moderator

    Do you want to do this in one specific place or for your entire application? Making this work globally could be tricky.

    If you just need it in one specific place, you could look at LocateControl in stdlib and see how it handles processing the Enter key. It uses SetWindowProc and then handles the window messages in the Enterproc method. You could do something similar. There is a SetFocus function that you could also use to place the focus in the other control as long as you have a window handle.

    November 10, 2014 at 8:36 pm in reply to: What about replication in suneido? #1114
    j_ferguson
    Moderator

    Hello Tahar,

    Suneido does not have any built-in replication features for the database (not yet anyway).

    There has been some work done on ODBC connections and MySQL interfaces from Suneido. You can find them here:

    http://www.suneido.com/support/downloads

    Quite a few of the downloads available on the page have not maintained with every release of Suneido therefore some may not work with the current download of Suneido.

    One way of doing a backup while Suneido is running is to use the Dump() function. If you call it with no table argument, it makes a dump of the entire database to your current working directory. This type of backup wouldn’t work as a real-time solution since it is dumping the entire database when you call Dump(). Since it is dealing with the entire database it is not something you want to be calling too frequently.

    November 3, 2014 at 3:03 pm in reply to: Error compiling library #1112
    j_ferguson
    Moderator

    Hello Tahar,

    There seems to be an issue with the compiled library feature. I am noticing the same issues. We will check into it.

    Thanks for reporting this.

    November 3, 2014 at 2:59 pm in reply to: Is there some one here? #1113
    j_ferguson
    Moderator

    It looks like there might be an issue with storing the compiled code in the libraries currently. I get an error as well when trying to saved the compiled code. We will look into it.

    Thank you for reporting this.

    November 3, 2014 at 2:49 pm in reply to: may be a bug #1111
    j_ferguson
    Moderator

    Hello Tahar,

    Sorry for the delayed reply.

    The problem is that you are calling Params in your arguments to Window which will already create its own window.

    Try either

    Params(#(Text “Hello”), ‘pg’, #(Text “Goodbye”))

    or

    Window(Object(‘Params’ #(Text “Hello”), ‘pg’, #(Text “Goodbye”)))

  • Author
    Posts
Viewing 15 posts - 1 through 15 (of 43 total)
1 2 3 →

Search Forums

Log In
Welcome to the new Suneido Web Site and Forum.
Register
Lost Password
users of the previous PHPBB Forum should be able to log in with their previous username and password.

Recent Topics

  • Alpha copy of gSuneido to play with
  • how to start jsuneido ?
  • Problem Starting Suneido…
  • Dialog not showing buttons
  • New link for Suneidojo

Contact Us | Legal Statement | Privacy Statement | SiteMap

Copyright © 2026 Axon® Development Corporation. All Rights Reserved. - Open Source Integrated Database and Programming Language