Source language: Translate to:

Updating applications with DBPro

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Updating applications with DBPro

Postby stu » Mon Jan 26, 2015 8:16 am

I was having so much fun with all my imaginary friends on the weekend that I decided it was time to sort one of the long lasting problems I face when trying to update applications for users within the network...

So here's my (expensive) version of how to update a dozen frontends with a few clicks, I hope we can share on the subject and see if someone has faced this issue and the way it manage to sort it out.

So for a start, plugins, that makes it a little expensive but its really effective.

Need:

- Neobook DBPro ($99.00)
- NeobookFM/FTP ($79.00)
- npHash ($39.95)

As said, this is the expensive way because are the plugins I know. I think David had a plugin called NeoCiph that you could use to replace npHash and save $40 then again, support the devs ;)

I got a network with a deploy fileserv I use to put all the frontends in different folders. That will be "FILESRV" in the example. So every time I do changes to a frontend I put it in the correspondent folder and then (used to) go to the department and download from there. This frontends all work with SQL Server dbs.

So, start creating a new table in the database that corresponds to the frontend. I called it tblVersion
This table holds the following fields:

ID - Autoinc
VersionNo - VarChar
MD5 - VarChar
Path - ShortText

Looks like this:

Image

Here's where you modify each time you make a change to the frontend and then you put it in the deploy file server.

Now, start code for the app:

Syntax: [ Download ] [ Hide ]
Using Neobook Syntax Highlighting
npHashCreate "[Result]"
.. So this gets the checksum from the user frontend
npHashFile "1" "haMD5" "!C:\FE\SODAREPS.EXE" "[LocalCheckSum]"
dbpShowErrors "No"
.. Connecting to the database
dbpOpenDatabase "SODA" "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=[DB];Data Source=[SRV]"
.. Check if connected first and then open the newly created tblVersion
.. after this if the checksum of the local file is different to the one stored
.. in the database it will make use of all the badassery on FM/FTP
..  to get the new version and replace the one in the local folder.
if "[SODA.$Status]" "=" "Connected"
   dbpOpenTable "SODA" "tblVersion" ""
   if "[LocalCheckSum]" "<>" "[SODA.tblVersion.MD5]"
      Alertbox "Attention" "New version available for download."
      fmConnectLocal "LOCAL" "InitialPath=\\DATABASESRV\New 2008\dbdeploy\"
      fmCopyFrom "LOCAL" "[SODA.tblVersion.Path]" "!C:\FE\" "GetConfirmation=No;ShowProgress=Yes;AllowResume=No"
      fmDisconnect "LOCAL"
   endif
else

.. what ever you want homie...

endif

npHashDestroyAll
Parsed in 0.008 seconds, using GeSHi 1.0.8.10


Aaaand...believe it or not, thats it... that all there is, proven to work... now I don't need to move from departments and have a lot more time to play Solitaire.

What do you guys think?, Any ideas for alternative plugins that can be used to accomplish this?

I gotta say, I love the way it works. So smooth and silent... :D
User avatar
stu
 
Posts: 318
Joined: Wed Aug 07, 2013 11:37 am

Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 2 guests

cron