Database Update - InfoPath Dev
in

InfoPath Dev

Database Update

Last post 07-13-2012 08:09 AM by Hilary Stoupa. 24 replies.
Page 1 of 2 (25 items) 1 2 Next >
Sort Posts: Previous Next
  • 07-10-2012 06:10 AM

    Database Update

    I have a feeling this is A) not possible or B) possible but very difficult. I have a form I have created that uses cascading listboxes to display information from Microsoft Access. Every month or so the database gets updated (revisions, new information). Is there anyway that I can deny users from submitting a form that is not using the most up to date database? There are some people who are a bit slow with updating the database when they are supposed to. I just want to ensure that the most up to date information is being submitted and not old information. If this is very difficult and time consuming that's fine. If someone could just let me know either way so I don't spend an exorbitant amount of time for something that will reach far beyond my infopath abilities. Thanks!
  • 07-10-2012 02:44 PM In reply to

    First, your description is insufficient to clearly understand your situation. Second, why you just simply don't deny access to or use of outdated database on a server? Third, I even do not understand why what you describe is possible at all and how it is realated to Infopath
    Gennady Vanin (Novosibirsk) --- Геннадий Ванин (Новосибирск)
  • 07-10-2012 06:18 PM In reply to

    To your second point, I can't share the database through a server since it must be able to be accessed when offline. To your third point, I am not sure it is possible that's why I am asking. It is related to infopath because it is a data connection that receives data.
  • 07-12-2012 05:34 AM In reply to

    I'm going to guess that this just isn't possible.
  • 07-12-2012 05:43 AM In reply to

    shep123:
    I'm going to guess that this just isn't possible.
    If you refer to using Infopath as a system and/or database administration tool, then it is more correctly to name it by other terms
    Gennady Vanin (Novosibirsk) --- Геннадий Ванин (Новосибирск)
  • 07-12-2012 05:48 AM In reply to

    I have no idea what you mean. I am creating a form in Infopath. Using Infopath to set up a data connection. So it has everything to do with Infopath. I don't know what other terms you mean for naming.
  • 07-12-2012 07:31 AM In reply to

    shep123:
    I can't share the database through a server since it must be able to be accessed when offline

    This is wrong statement, cf.

     

    i.e one can use local off-line copies of one shared database (to be synchronized / replicated when online) and the question is unrelated to Infopath (off-topic), of too broad and fuzzy scope

    Gennady Vanin (Novosibirsk) --- Геннадий Ванин (Новосибирск)
  • 07-12-2012 07:42 AM In reply to

    Hi - by most up to date database, what do you mean? Do they each have the database locally?

    I mean, you could store a value in the database in a table called "last updated" and if it is greater than a certain date, disable the submit button, I suppose....

    In general, if you do mean that there are multiple copies of the database itself floating around, I do have to kind of question that architecture - it seems like the point of a database is for everyone to use the same instance.

    EDIT: Sorry, the post about it needing to work offline came in while I was typing ...

    Hilary Stoupa

  • 07-12-2012 07:44 AM In reply to

    Edit: See post below
  • 07-12-2012 07:52 AM In reply to

    My self the enemy,
    I was thinking about distributing it through email. My only question is can you deny access to infopath if someone hasn't downloaded the newest database? I know that is outside the scope of Infopath so if you don't know that's fine.

    Hilary,
    Periodically a new database is sent out (updated one with say 3 additional records). This update is not done on a set time period such as every 4 weeks (although could do that if necessary, but prefer not to). The form is stored locally on each computer. When a new database gets sent out the user downloads it from the email/other distribution and saves it to their local computer in place of the old database. Ideally, the form would reject the database if it isn't updated. I'm guessing the best way to do that would be use a "last updated" method. Does that clarify what I'm trying to accomplish?
  • 07-12-2012 08:54 AM In reply to

    I found some code online that I could use. It was in VBA so I did some minor edits, I still have a form code error. I guess I would put this code (when it works) in the form load event and have it trigger an action that blocks use of form instead of displaying that message box. Am I going in the right direction or completely wrong?

    Sub GetDateLastModified()

    Dim oFS
    Dim strFilename

    strFilename = "c:\temp\fileA.xls"


    Set oFS = CreateObject("Scripting.FileSystemObject")

    x = MsgBox(strFilename & " was last modified on " & oFS.GetFile(strFilename).Datelastmodified, 0, "prompt")

    Set oFS = Nothing

    End Sub
  • 07-12-2012 09:30 AM In reply to

    shep123:
    When a new database gets sent out the user downloads it from the email/other distribution and saves it to their local computer in place of the old database. Ideally, the form would reject the database if it isn't updated. I'm guessing the best way to do that would be use a "last updated" method
     

    Is database updated (Update: by users) locally?

    • If the answer is "no", then just show it from central location (shared folder ) to all
    • If "yes", how the databases are syncronized without server involvement?

    How will Infopath form know about database being up-to-update without checking it on a central location (server)?
    This undermines off-line use, if a database useis being blocked by absence of response from a central location (server)

    Gennady Vanin (Novosibirsk) --- Геннадий Ванин (Новосибирск)
  • 07-12-2012 09:43 AM In reply to

    I think I'm just struggling to relay my thoughts. The owner creates the database locally. Then he distributes it through email to the users who then download the database and store it locally. It's basically like me creating a file putting it on a USB drive and then uploading it on everyone's computer. Once it is on the other computers there is no longer a connection to me as the owner. Therefore, I think I need to do what Hilary alluded to and use a data last modified method to say whenever that value is greater than X, the form can't submit.
  • 07-12-2012 11:54 AM In reply to

    I figured it out. Hilary's method was the easiest and I used the DateDiff function.
  • 07-12-2012 12:03 PM In reply to

    If anyone knows the vbs code to close a form that would be helpful. I have an if statement based on date differences. I want the form to close when a statement is true. I have all the code already with the exception of the form close. I've tried a bunch of stuff along the lines of Application.ActiveWindow.Close = True and nothing seems to work.
Page 1 of 2 (25 items) 1 2 Next >
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.