472,119 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

a2k - how to code a simple version check over the net

Thought it might be a cool feature to allow my users to click a button,
and connect to a webpage that would tell them if a more recent version
was available.

I can create a button that opens a webpage but it would be nice if it
could compare what they have with what I say is available, so I can say
something like "You have version 1.2. Version 1.3 is now available".

Any ideas?
Nov 13 '05 #1
3 1326
Deano wrote:
Thought it might be a cool feature to allow my users to click a button,
and connect to a webpage that would tell them if a more recent version
was available.

I can create a button that opens a webpage but it would be nice if it
could compare what they have with what I say is available, so I can say
something like "You have version 1.2. Version 1.3 is now available".

Any ideas?


When I "build" I create/update a Current Project "CurrentBuild" property
as follows:

'*******
With CurrentProject.Properties
CurrentBuild = .Item("CurrentBuild") + 1
.Add "CurrentBuild", CurrentBuild
.Item("CurrentBuild").Value = CurrentBuild
End With
'*******

I also update the htm page:

'*******
Private Sub UpdateCurrentBuildFile(ByVal cb As Long)
Dim FileNumber As Integer
Dim HTML As String

On Error GoTo UpdateCurrentBuildFileErr

FileNumber = FreeFile()

HTML = String(FileLen(CurrentBuildTemplatePath), vbNullChar)
Open CurrentBuildTemplatePath For Binary As #FileNumber
Get #FileNumber, , HTML
Close #FileNumber

Kill CurrentBuildPath

FileNumber = FreeFile()

Open CurrentBuildPath For Binary As #FileNumber
Put #FileNumber, , Replace(HTML, "number", CStr(cb))
Close #FileNumber

UpdateCurrentBuildFileExit:
Close
Exit Sub

UpdateCurrentBuildFileErr:
With Err
MsgBox .Description, vbCritical, "Error # " & .Number
End With
Resume UpdateCurrentBuildFileExit
End Sub
' *******

and the code of my form to check the build is

'*******
Private Sub Form_Load()
With DoCmd
.Restore
.RunCommand acCmdSizeToFitForm
End With
Me.Caption = "The build number of the current file is " &
CurrentProject.Properties("CurrentBuild").Value & "."
End Sub

Private Sub Form_Open(Cancel As Integer)
Me.wbHDSBHelp.Navigate "http://ffdba.com/ESO/CurrentBuild.htm"
End Sub
' *******

wbHDSBHelp is a web browser control

--
--
Lyle
--
From ADO28.chm

Deprecated Components
Each of the following components is considered obsolete. While these
components are still supported in this release of the Microsoft® Data
Access Components (MDAC), they may be removed in the future. When
writing new applications, you should avoid using these deprecated
components. When modifying existing applications, you are strongly
encouraged to remove any dependency on these components.

.....

Jet and Replication Objects (JRO)
The Microsoft Jet OLE DB Provider and other related components were
removed from MDAC 2.6. Microsoft has deprecated the Microsoft Jet
Engine, and plans no new releases or service packs for this component.
As a result, the Jet and Replication Objects (JRO) is being deprecated
in this release and will not be available in any future MDAC releases.

.....
Nov 13 '05 #2
Lyle Fairfield wrote:
Deano wrote:
Thought it might be a cool feature to allow my users to click a
button, and connect to a webpage that would tell them if a more
recent version was available.

I can create a button that opens a webpage but it would be nice if
it could compare what they have with what I say is available, so I
can say something like "You have version 1.2. Version 1.3 is now
available".

Any ideas?


<code snipped>

Thanks for that Lyle, that's got me thinking. Not sure about the web
control as I like to ship with as few additonal controls as possible.
Nov 13 '05 #3
Deano wrote:
Thanks for that Lyle, that's got me thinking. Not sure about the web
control as I like to ship with as few additonal controls as possible.


It's a good point; I am doing my help with remote html files read
through the web control however. In this way I can make them (very)
dynamic and responsive to users questions, needs, stubborness etc ...
and pretty them up too.

--
Lyle
Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

242 posts views Thread by James Cameron | last post: by
6 posts views Thread by TPJ | last post: by
4 posts views Thread by jason.awlt | last post: by
232 posts views Thread by robert maas, see http://tinyurl.com/uh3t | last post: by
24 posts views Thread by David | last post: by
4 posts views Thread by David | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.