Solved

Retrieve the version number from internet of my application

Posted on 2004-09-15
6
191 Views
Last Modified: 2010-05-02
Hi all,

I have to retrieve the version number that is uploaded in an internet page of my application to compare with the version I'm using (this is what it has to do when the user works with it).

So my question is a little bit long (the answer). I need to know how to connect to a Internet page, what is the most useful way to consult the version (a text file, HTML page, database (only nedded for this) ...) and how I can read this information. Everything in Visual Basic code.

Thanks for your help in advance, it would be very apreciated (I need it for today :-( ).

Regards.
0
Comment
Question by:trulx
  • 2
  • 2
  • 2
6 Comments
 
LVL 11

Expert Comment

by:coopzz
ID: 12062156
hmm. I take it you client apps are connecting to your online server via a browser control or some sort..

if this is the case when you send off the first request to the server just pass the version of your client app in a query string and validate it on your server and return to your client app.

eg..
www.myServer.com/login.asp?ver=1.1.0.r5

many other ways of doing this -- creating your own simple webservices and posting to and from, etc..

for validation of the version if your using asp you can just store it as a var in the page and update when nessacery.
0
 

Author Comment

by:trulx
ID: 12062226
The application is built in Visual Basic (the client who must ask for the version). For uploading the setup file to internet we have something done in asp (but I have no idea of how is it done and i can't see it now). So I was thinking in updating the version in an INI file in the server and retrieving it from the client with FtpGetFile.

You told me something about storing it like a var. Can I read this var from a Visual Basic app?
0
 
LVL 11

Expert Comment

by:coopzz
ID: 12062336
OK what I've done in the past and it takes a little while to program (and get it bug free) and I got no access to it currently but what I would do is create an xml/(database if it's part of your bussines logic) on your server.

create a new asp page that returns xml/plain text depends how you want them to talk to each other.. ie: your making a webservice that can be queried.  I know .net you can make them natively but I take it you haven't got access to this.

Next you'll have to find some code that submits a page and grab the request (which will be your xml/plain text returned) and decide what to do from there.  update, continue working, ask for something else, download file, etc...

You can encript your transmissions and so forth.

CooPzZ
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Accepted Solution

by:
martin_watts earned 350 total points
ID: 12063053
You could create an xml document, call it "version.xml", and put this inside:

<?xml version="1.0" encoding="utf-8" ?>
<version>
      <currentversion>1.2</currentversion>
</version>

Put this file somewhere on your webserver.

Put the following code in your app (you'll have to include a reference to MSXML):

Dim oDoc As MSXML2.DOMDocument()
Dim sVersion as String

set oDoc =  New MSXML2.DOMDocument()
oDoc.async = False
oDoc.load("http://www.myserver.com/version.xml")   ' myserver.com obviously replaced with the correct url
sVersion = oDoc.selectNodes("version").item(0).text()

Good luck.
0
 

Author Comment

by:trulx
ID: 12063092
I don't know if I'm going to use this solution because we need to store the version of more applications so I think I will need a database to do it but I appreciate your help. With this comments and my morning searching I'm making an idea of how it could be the solution.

Thanks all!
0
 
LVL 1

Expert Comment

by:martin_watts
ID: 12072723
Because the file is in XML format, you can add as many version numbers as you want, for any number of applications, in a very structured way. For example:

<?xml version="1.0" encoding="utf-8" ?>
<appinfo>
     <myApp1>
          <version>1.2</version>
     </myApp1>
     <myApp2>
          <version>2.5</version>
          <downloadurl>http://www.myserver.com/myApp2/myApp2_2_5.zip</downloadurl>
     </myApp2>
</appinfo>

You'll just have to look into the structure of the MSXML api a little more to find the best way for retrieving all your settings. ;)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Put text in a picture ASP.NET C# 2 68
Getting warning: You are about to delete 1 row(s) 9 53
VB6 ListBox Question 4 56
Formula problem with Excel attachment 6 43
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question