Access 2003 developer extensions

T

Tony Toews

Brendan Reynolds said:
Rather than downloading a text file, you could use an ASP.NET Web Service
that returned the status information (e.g. whether a newer version was
available) as XML. Interfacing with the Web Service from Access is quite
easy with the Office Web Services Toolkit. The advantage is that the user
would not be faced with any download prompts when checking for available
updates, only when actually downloading the update itself.

Ah, now that's an interesting idea too. I'll have to investigate that
for my Auto FE Updater.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
S

StuJol

Gents,

Thank you all for your comments but as a new starter to access all this is
starting to go over my head. i have a rough idea of what im trying to do but
just cant do it.

I have created a text file on my website
"http://www.easy-to-use-databases.co.uk/Databases/Job_Manager/Job_Manager_Revisions.txt" which shows all my revisions.

i can use the hyperlink cmd to view the text file in a browser but what i
want to do is download via vb script
http://www.easy-to-use-databases.co.uk/Databases/Job_Manager/Job_Manager_Revisions.txt"
and save it to a directory. Can any of you smart guys point me in the right
direction? once i have this as a text file on my computer i can then use the
texttransfer cmd to import it into my database to use.
 
B

Brendan Reynolds

I'm not usually a big fan of XML, but this is exactly the sort of thing it
is made for. I suggested earlier the use of a Web Service to return the data
as XML, but if you're using Access 2003, you don't need to use a Web
Service, you can use the ImportXML method. Try this ...

Public Sub TestImport()

ImportXML "http://brenreyn.brinkster.net/employees.xml"
MsgBox "Finished!"
End Sub

It may take a minute or two, so be patient. When you see the message box,
look at your tables, and you'll have a new one called "Employees" (or if you
already had a table called "Employees" the new one will be named
"Employees1", etc) containing the data from the Northwind Employees table.
Just get your data into XML format and you can replace the URL in the
example above with the URL to your own file.
 
S

StuJol

Brendon,

Many many thanks, i cant beleive it was that simple. One quick question,
downloading ur file created a new employees table because i had one already,
is their away to get it to overite the data in the original table so a new
table isnt created?
 
B

Brendan Reynolds

Yes, the ImportXML method has an optional 'ImportOptions' argument that can
be used to specify whether you want to import structure and data, structure
only, or append the data to an existing table. To append the data set that
argument to acAppendData ...

ImportXML "http://brenreyn.brinkster.net/employees.xml", acAppendData

If you try this in a database that already contains the Northwind Employees
table, you'll get an error, because the imported data has the same values in
the primary key field as the existing data. You'd need to run a delete query
to delete the old data first ...

CurrentProject.Connection.Execute "DELETE * FROM Employees"
ImportXML "http://brenreyn.brinkster.net/employees.xml", acAppendData
MsgBox "Finished!"

Depending on what you were importing, in a production environment you might
want to download to a staging table, then append the data to the working
table and delete from the staging table. You'd probably use a transaction,
so that you could roll back to the previous state if something went wrong.
But that might be overkill if you just need to download some status
information about whether a later version is available.

The downside is that this will not work with older versions of Access. I
can't remember whether the ImportXML method was first introduced in Access
2003 or Access 2002, and I don't have an installation of Access 2002
available to check - can anyone else clarify that?

Of course, if you don't need to support earlier versions, that's not a
problem.
 
S

StuJol

Albert,

Im having a few minor problems with inno, wondered if you could spot the
mistake!
I have a folder called AccessRuntime and one called Job Manager, These are
my two files as you surgested. During the inno wizard i attached both these
folders with sub folders. These folders are in the other application files.
The application doesnt have a main exe file is ticked.

All the files uninstalled ok, but when i add a [run] command in inno and ran
the setup, inno couldnt install the two msi files? Any ideas please

[Files]
Source: "M:\Easy To Use Databases\Databases\Job Manager\Version 1.0.0\Inno
Files\Access Runtime\*"; DestDir: "{app}"; Flags: ignoreversion
recursesubdirs createallsubdirs
Source: "M:\Easy To Use Databases\Databases\Job Manager\Version 1.0.0\Inno
Files\Job Manager\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs
createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[INI]
Filename: "{app}\Internet shortcut.url"; Section: "InternetShortcut"; Key:
"URL"; String: "http://www.easy-to-use-databases.co.uk"

[Icons]
Name: "{group}\{cm:programOnTheWeb,Job Manager}"; Filename: "{app}\Internet
shortcut.url"
Name: "{group}\{cm:UninstallProgram,Job Manager}"; Filename: "{uninstallexe}"

[UninstallDelete]
Type: files; Name: "{app}\Internet shortcut.url"

[Run]
FileName: {app}\Files\AccessRu.msi; Parameters: "/qb"
FileName: {app}\Files\JobManag.msi; Parameters: "/b"


Albert D.Kallal said:
StuJol said:
ok, this sounds good. I will give it a try. Can i put both installs onto 1
disk or should i have 2 seperate disks. If both are on one disk how do i
run
the install for both of them?

You simply create two directories...and put in each install. Of course, this
means the disk will not auto install. So, even better would be to use
inno...and wrap both part 1, and part 2 into a single install process......

The following inno script would install the runtime

[Files]
Source: "*"; DestDir: "{app}"
Source: "files\*"; DestDir: "{app}\files"
Source: "files\setup\*"; DestDir: "{app}\files\setup"
[Run]
FileName: {app}\setup.exe; Parameters: "/qb"

note we are just simply useing the "setup" command with a /qb (q = quiet, b
= progress bar). The "q" thus eliminates all of the prompts (and questions
like custom/typical install). This is the msi (Microsoft) setup we are
talking about here.

You have to play with inno for a few hours..but it really is easy to learn
and use. Read the help..and there is also a newsgroup for inno (you find all
of this in the link I gave you).

Further, since you are likely not a 100% perfect developer, you going to
need
to setup a "update" disk (or better web site) where people can
download/install a updated version of your software (and, you will NOT need
to re-install or even waste space packaging the runtime anyway....they
already have it!!). So, having a separate install prepares you a whole
setup systems that will allow easy update of your uses (and, you will have
to do this anyway...so, might as well kill two birds with one stone).

IF you look at the following ms-access screens...you can see that I use a
web site..and inno installer to update my software...

http://www.kallal.ca/ridestutorial/upgrade.html

The last few screens are not ms-access...but of course inno....

The intial help screens etc..are ms-access....

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
(e-mail address removed)
http://www.members.shaw.ca/AlbertKallal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top