Runtime Access database 
Author Message
 Runtime Access database

I asked this question a few days ago, but I may not have
asked it correctly:

I need to know what (if any) files/utilities I will need
to utilize an Access database file (mdb) on systems with a
clean operating system (Office/Access not installed), and
if some additional files are required, where I would get
these downloads. I'll be running this script on Me, 2K,
and XP.

I'm currently having an issue on an XP system where as
soon as I try to loop through a recordset (Do While Not
RS.EOF), my script seems to hang (I have logging before
and after the Do line, and only the logging before the Do
line shows up).

This same script runs fine on other systems that have
Access (Office) installed.

Do I need to install MDAC, Jet 4.0, and/or anything else
on Me, 2K, and XP? Should I post this to another newsgroup
since this is a scripting/database question?

Thanks again,
Bill



Wed, 17 Aug 2005 00:35:07 GMT  
 Runtime Access database

Quote:

> I asked this question a few days ago, but I may not have
> asked it correctly:

> I need to know what (if any) files/utilities I will need
> to utilize an Access database file (mdb) on systems with a
> clean operating system (Office/Access not installed), and
> if some additional files are required, where I would get
> these downloads. I'll be running this script on Me, 2K,
> and XP.

> I'm currently having an issue on an XP system where as
> soon as I try to loop through a recordset (Do While Not
> RS.EOF), my script seems to hang (I have logging before
> and after the Do line, and only the logging before the Do
> line shows up).

> This same script runs fine on other systems that have
> Access (Office) installed.

> Do I need to install MDAC, Jet 4.0, and/or anything else
> on Me, 2K, and XP? Should I post this to another newsgroup
> since this is a scripting/database question?

> Thanks again,
> Bill

Hi, Bill
Your question about requirements might better be answered in the ADO-related newsgroups.  Post to the two to four groups that seem
most likely on topic, posting to all of them at once, rather than separately.  Makes it much easier for those reading those groups,
and easier for you too, since you can go to just any one place to see responses from all of the newsgroups.

To find your problem, search for any 'on error resume next' ... 'on error goto 0' occurrences in your script and make sure that
these statements encompase the fewest lines of code necessary.  Since your program hangs with no error message, the problem is
probably occurring somewhere that error checking is turned off.

You might also try to pare down the script to something really simple to find the problem.  I use code as simple as the following to
find problems, adding in more stuff until the problem becomes obvious.  With error checking NOT turned off, I'm just about
guaranteed to get a helpful error message or a success message.

'Ref: msdn.microsoft.com\library\techart\daotoadoupdate.htm
Dim cnn  'As New ADODB.Connection
Set Cnn = WScript.CreateObject("ADODB.Connection")
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
 "Data Source=.\NWind.mdb;"
cnn.Close
msgbox "Connection open was successful"

-Paul Randall



Wed, 17 Aug 2005 01:26:30 GMT  
 Runtime Access database
Thanks for the quick reply Paul. I just want to be clear
about the file requirements:

Are there any other files required to support ADO access
to an Access database (mdb) on a system with a clean
operating system?

Thanks again,
Bill

Quote:
>-----Original Message-----

>> I asked this question a few days ago, but I may not have
>> asked it correctly:

>> I need to know what (if any) files/utilities I will need
>> to utilize an Access database file (mdb) on systems
with a
>> clean operating system (Office/Access not installed),
and
>> if some additional files are required, where I would get
>> these downloads. I'll be running this script on Me, 2K,
>> and XP.

>> I'm currently having an issue on an XP system where as
>> soon as I try to loop through a recordset (Do While Not
>> RS.EOF), my script seems to hang (I have logging before
>> and after the Do line, and only the logging before the
Do
>> line shows up).

>> This same script runs fine on other systems that have
>> Access (Office) installed.

>> Do I need to install MDAC, Jet 4.0, and/or anything else
>> on Me, 2K, and XP? Should I post this to another
newsgroup
>> since this is a scripting/database question?

>> Thanks again,
>> Bill

>Hi, Bill
>Your question about requirements might better be answered

in the ADO-related newsgroups.  Post to the two to four
groups that seem
Quote:
>most likely on topic, posting to all of them at once,

rather than separately.  Makes it much easier for those
reading those groups,
Quote:
>and easier for you too, since you can go to just any one

place to see responses from all of the newsgroups.
Quote:

>To find your problem, search for any 'on error resume

next' ... 'on error goto 0' occurrences in your script and
make sure that
Quote:
>these statements encompase the fewest lines of code

necessary.  Since your program hangs with no error
message, the problem is
Quote:
>probably occurring somewhere that error checking is
turned off.

>You might also try to pare down the script to something

really simple to find the problem.  I use code as simple
as the following to
Quote:
>find problems, adding in more stuff until the problem

becomes obvious.  With error checking NOT turned off, I'm
just about
Quote:
>guaranteed to get a helpful error message or a success
message.

>'Ref:

msdn.microsoft.com\library\techart\daotoadoupdate.htm

- Show quoted text -

Quote:
>Dim cnn  'As New ADODB.Connection
>Set Cnn = WScript.CreateObject("ADODB.Connection")
>cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
> "Data Source=.\NWind.mdb;"
>cnn.Close
>msgbox "Connection open was successful"

>-Paul Randall

>.



Wed, 17 Aug 2005 05:43:37 GMT  
 Runtime Access database

Quote:

> Thanks for the quick reply Paul. I just want to be clear
> about the file requirements:

> Are there any other files required to support ADO access
> to an Access database (mdb) on a system with a clean
> operating system?

> Thanks again,
> Bill

Hi, Bill

Hopefully someone more knowledgable will be able to help.  I don't know whether the stuff required for ADO is on the installation
disk for these OSs.  I know that the amount of space used for a 'clean' install of the OSs you are interested in can vary by
hundreds of megabytes, depending on the type of install that you do.  Perhaps someone knows exactly which options to choose in each
of them to get what you want. (Me, 2K, and ?XP Home or Pro?).

-Paul Randall



Wed, 17 Aug 2005 06:48:26 GMT  
 Runtime Access database

Quote:
> I need to know what (if any) files/utilities I will need
> to utilize an Access database file (mdb) on systems with a
> clean operating system (Office/Access not installed), and
> if some additional files are required, where I would get
> these downloads. I'll be running this script on Me, 2K,
> and XP.

If you get as far as looping through a recordset, then you likely have all
the components you need, otherwise you would never have gotten that far <g>!

Quote:
> I'm currently having an issue on an XP system where as
> soon as I try to loop through a recordset (Do While Not
> RS.EOF), my script seems to hang (I have logging before
> and after the Do line, and only the logging before the Do
> line shows up).

Are you logging at points 1, 2, and 3 or just 1 and 3?

<1 - log before Do>
Do While Not RS.EOF
    <2 - log inside Do>
    ...whatever...
Loop
<3 - log after Do>

There is nothing in the "Do While Not RS.EOF" that would cause a hang unless
RS.EOF is never reached.  Is there conditional logic within the Do...Loop
that might cause RS.MoveNext to be bypassed under some unexpected
circumstance?

Quote:
> This same script runs fine on other systems that have
> Access (Office) installed.

> Do I need to install MDAC, Jet 4.0, and/or anything else
> on Me, 2K, and XP? Should I post this to another newsgroup
> since this is a scripting/database question?

As I said earlier, not having the necessary components is highly unlikely.

--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US

Technet Script Center
http://www.microsoft.com/technet/scriptcenter/default.asp



Wed, 17 Aug 2005 09:40:15 GMT  
 Runtime Access database
I wish I could give you a yes/no answer to your yes/no question, but there
can be many factors involved. On the one hand, Windows ME, 2K, and XP all
come with the Jet 4.0 OLE DB provider and Jet 4.0 ODBC driver, which give
you everything you need to access Jet-supported objects in MDB files using
Jet-supported SQL syntax. On the other hand, MDB files can contain both
Jet-supported objects and Access-specific objects, and Jet can execute SQL
syntax which is implemented by any combination of Jet, Access, and VBA. The
most likely problem is that your code is asking Jet to do something beyond
what Jet can support by itself.

What is the actual query that your problem Recordset is based upon? Does it
reference any linked tables, any pass-through queries, or (most likely) any
functions other than aggregations? Linked tables or pass-through queries
could be using ISAM drivers with versioning issues, or they might use Office
Data Connections which won't work without Office/Access installed. An
aggregation is a function like SUM() or MAX(), which is OK because Jet
implements aggregations internally, but if you use a function like
DLookup(), that's implemented by Access. If you use something like IIf() or
Left(), those are implemented by VBA. In those cases, Jet would be trying to
pass those off to Access or VBA to be evaluated. Depending on your query,
they might not be evaluated until you start retrieving data, which is why
you stop inside the Do as soon as you try and reference something in the
Fields collection.

Also, sorry if this seems too obvious, but are you sure you're using ADO and
not DAO? Both have object models have a "Recordset" object, but
ADODB.Recordset and DAO.Recordset are implemented by different DLLs. If
you're using CreateObject() in your script to instantiate all objects, there
would be no chance of mixing them up, but if you're using <reference> tags
in a *.wsf script, it might not be too difficult to confuse ADO and DAO
objects. A system with Access installed will always have DAO installed. A
system without Access can have DAO (installed from other products), but no
OS comes with DAO right out of the box. In contrast, Windows ME, 2K, and XP
all come with ADO right out of the box.

Assuming you're using ADO, what's your connect string? Are you connecting
with Provider=Microsoft.Jet.OLEDB.4.0, or are you connecting to MSDASQL (the
OLE DB provider for ODBC) and then specifying the Microsoft Access Driver
(or a DSN using that driver)? If you're using OLE DB without specifying the
4.0 version of the provider, try doing so. At the very worst, your script
will stop working on the machines that have Access, which will tell you that
you're using some Jet version-specific feature like an ISAM driver. If
you're going through ODBC and you don't have a reason, try changing your
connect string to use the OLE DB provider. If you do have a reason, then you
need to compare the version of ODBC driver you're specifying with the
version of your MDB.

If you isolate something that your code is doing which requires more than
just Jet, you can sometimes make minor changes to your syntax or logic to
avoid that. Even if you can't, there are several options for redistributing
varying pieces of Access (from DAO to OWC to a full runtime) without
licensing or installing Access.

Lastly, without knowing more about exactly what you're doing and what your
environment is like, it's also hard to rule out the possibility that maybe
your script isn't working on non-Access machines for reasons other than
Access being missing. Even though it sounds like you've got a variety of
non-Access machines, you might be in an organization which "Ghosts" or
images its desktop configurations. If something went wrong in creating the
images, you could wind up with a misleading pattern of machines exhibiting
the same problem. On your non-working machines, try applying Jet 4.0 SP6 to
make sure that Jet components are undamaged, as well as up to date. See
http://support.microsoft.com/?id=282010 to download Jet 4.0 SP6 for the
various operating systems.


Quote:

> > Thanks for the quick reply Paul. I just want to be clear
> > about the file requirements:

> > Are there any other files required to support ADO access
> > to an Access database (mdb) on a system with a clean
> > operating system?

> > Thanks again,
> > Bill

> Hi, Bill

> Hopefully someone more knowledgable will be able to help.  I don't know

whether the stuff required for ADO is on the installation
Quote:
> disk for these OSs.  I know that the amount of space used for a 'clean'

install of the OSs you are interested in can vary by
Quote:
> hundreds of megabytes, depending on the type of install that you do.

Perhaps someone knows exactly which options to choose in each
Quote:
> of them to get what you want. (Me, 2K, and ?XP Home or Pro?).

> -Paul Randall



Thu, 18 Aug 2005 07:23:51 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Access on a MS-Access-database with an ADO-Object in Jscript

2. Accessing an Access Database throught the internet (NT4+IIS4), IDC and stuff

3. Can you Access an Access database using VBScript

4. How do I access an Access database (.dbf) using ODBC

5. Access to an Access database through Netscape Browser

6. using VBscript to access Access database in public folder

7. How to access to a MS ACCESS database?

8. Access database access

9. Accessing Access database

10. Access to an Access database through Netscape Browser

11. Accessing an access database

12. Trouble accessing an Access database from web

 

 
Powered by phpBB® Forum Software