Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

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

2020 defaults to 1920??

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

  • mgallardo
    replied
    I forget if this is something I made, got from the forum, or a bit of both. This is what I have running in our alpha autoexe script. Just change the targetDateWindow to whatever year you want.

    Code:
    dim currentSettings as P
    dim targetDateWindow as n = 30
    registry.load_settings("init",currentSettings)
    
    if .not. variable_exists("currentSettings.date.date_window") then
    currentSettings.date.date_window = 0
    end if
    if currentSettings.date.date_window <> targetDateWindow then
    dim updateSettings as p
    updateSettings.date.date_window = targetDateWindow
    registry.save_settings("init",updateSettings)
    msgbox("Relaunch required","Database needs to relaunch to update settings. Relaunching NOW.",UI_ATTENTION_SYMBOL+UI_OK)
    relaunchDatabase(a5.Get_Name(),"",.f.,.t.)
    end
    end if
    Just noticed I'm using a custom function to relaunch the database. Here is the contents of that function. Note I have a helper function after the main End Function.

    Code:
    FUNCTION relaunchDatabase AS C (adbFile as c, exeOnStart as C = "",asAdmin = .f., closeNow as L = .f.,no_check as L = .f. )
    'easiest way to pass in code for exeOnStart is to surround it with %code% deliminater e.g.
    ' OnStart = <<%code%
    ' msgbox("title","this is a test")%code%
    '
    'This would launch a message box as soon as the user logs in (or even if the login fails)
    
    
    dim alphaAnywhere as C
    alphaAnywhere = a5.Get_Exe_Path() +"\\" + a5.Get_Exe_Name()
    
    'CMD version: powershell -command "& {start-process -filePath """C:\Program Files (x86)\a5V12\alpha5.exe""" -verb runAs -argumentList """\\epudb1\a5_edit\a5_epu.adb"""}"
    dim params as C
    params = "-filePath " + TDQ(alphaAnywhere)
    if asAdmin then
    params = params + " -verb runAs"
    End if
    params = params + " -argumentList"
    
    '-argumentList is a powershell array, end each element with a comma
    dim argList as C
    
    'surround each powershell array element with single quote, separate each element with comma
    argList = " @(" ' start powershell array. need a space between -argumentList and @
    argList = argList + "'" + TDQ(adbFile) + "'"
    argList = argList + " ,'-nosplash'"
    
    if asAdmin Then
    argList = argList + " ,'-title=" + TDQ("Database Name (Elevated)") + "'"
    Else
    argList = argList + " ,'-title=" + TDQ("Database Name") + "'"
    end if
    
    IF exeOnStart <> "" then
    argList = argList + " ,'-command=" + stritran(alltrim(exeOnStart),"\"",chr(92) + "\"" + chr(92) + "\"" + chr(92) + "\"") + "'" 'must escape any double quote and triplicate to pass into sys_shell()
    end if
    
    argList = argList + ")" 'end powershell array
    
    params = params + argList
    
    dim cmdStr as C
    cmdStr = "-command "+ chr(92) + "\"" + "& {start-process " + params + "}" + chr(92) + "\""
    
    dim shared cliStr as C
    cliStr = "powershell.exe -executionPolicy bypass " + cmdStr
    
    dim Code as C
    code = "sys_shell(\"" + cliStr + "\")"
    'trace.WriteLn(code)
    on_application_exit(code)
    
    if closeNow then
    a5.close(no_check)
    end if
    
    
    END FUNCTION
    
    Function TDQ as C (string as c)
    'just a convenient way to surround a string with escaped quotes in triplicate
    'also keeps strings looking a bit cleaner and easier to read
    TDQ = chr(92) + "\"" + chr(92) + "\"" + chr(92) + "\"" + string + chr(92) + "\"" + chr(92) + "\"" + chr(92) + "\""
    End Function

    Leave a comment:


  • Wmcf
    replied
    Thanks, yes the final reg update is the one we'll need. I'll give it a try.

    Leave a comment:


  • armasoft
    replied
    We do this for all users, by running a 'reg import' as part of the users logon script...

    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CURRENT_USER\Software\Alpha Software\Alpha Five 10.0\init\date]
    "date_window#"="80.000000"
    [HKEY_CURRENT_USER\Software\Alpha Software\Alpha Five 11.0\init\date]
    "date_window#"="80.000000"
    [HKEY_CURRENT_USER\Software\Alpha Software\Alpha Anywhere 12.0\init\date]
    "date_window#"="80.000000"
    This modifies the registry for A5 V10, 11 & 12 (Alpha Anywhere), so you may not need all 3.

    Leave a comment:


  • Wmcf
    replied
    I have mutiple users and would like to change the date offset programatically but I cannot identify the appropriate function or system variable after reviewing the help documentation.

    Does anyone know how to change the setting programatically please?

    Leave a comment:


  • mgallardo
    replied
    Re: 2020 defaults to 1920??

    Originally posted by TerriH View Post
    So I need to check 'Require all years to be fully specified' - yes?
    And that now forces the users to actually input the 4 digit year? they are used to just inputting the month and date and have the year auto populate, but if this is the only work around so be it!

    How are you?

    Terri
    If you are running a networked version like I am with multiple users, it might save you some trouble to change the setting programmatically.

    Leave a comment:


  • Al Buchholz
    replied
    Re: 2020 defaults to 1920??

    Originally posted by MoGrace View Post
    99 might be ok if you aren't entering birthdates
    It's only a default setting value.

    It can still be over ridden, so you need to pick the most likely occurrence and adjust for the rest by typing in the CCYY.

    Leave a comment:


  • MoGrace
    replied
    Re: 2020 defaults to 1920??

    99 might be ok if you aren't entering birthdates

    Leave a comment:


  • TerriH
    replied
    Re: 2020 defaults to 1920??

    Thank you Al and Gregg!

    Leave a comment:


  • madtowng
    replied
    Re: 2020 defaults to 1920??

    you do have the option of changing that 20 to 30 , which will solve your problem for the next 10 years.

    or

    change 20 to 99 - a Y2K hangover that we won't have to worry about in our lifetime.
    Last edited by Al Buchholz; 01-02-2020, 11:45 AM. Reason: additional change option for the next 79 years.

    Leave a comment:


  • TerriH
    replied
    Re: 2020 defaults to 1920??

    So I need to check 'Require all years to be fully specified' - yes?
    And that now forces the users to actually input the 4 digit year? they are used to just inputting the month and date and have the year auto populate, but if this is the only work around so be it!

    How are you?

    Terri

    Leave a comment:


  • Al Buchholz
    replied
    Re: 2020 defaults to 1920??

    It's a setting that you need to change.

    Control panel - view - settings - system - date

    change 20 to 99 - a Y2K hangover that we won't have to worry about in our lifetime.
    Last edited by Al Buchholz; 01-02-2020, 11:44 AM.

    Leave a comment:


  • TerriH
    started a topic 2020 defaults to 1920??

    2020 defaults to 1920??

    Came in this morning and our dates are now defaulting to 1920 instead of 2020. Where do I go to fix this?
    I was surprised because up to now our 'year' was always correct.
    Thanks in advance for any help.

    Terri
Working...
X