Can VBScript under WinScriptHost connect to Access db without Access being installed on the workstation 
Author Message
 Can VBScript under WinScriptHost connect to Access db without Access being installed on the workstation

I am trying to write a VB Script to run on a Win 95 workstation that can
make changes to the structure of an Access mdb file on a machine that does
not have access installed.

I don't seem to be able to find a syntax that allows me to connect to the
mdb file.

I know that DAO allows such connectivity, but I don't know if VB Script can
accomplish the connection, or if one has to develop a full Visual Basic
Application.

Any help appreciated.

Kyle Roth



Tue, 22 Oct 2002 03:00:00 GMT  
 Can VBScript under WinScriptHost connect to Access db without Access being installed on the workstation
What do you mean by "make changes to the structure of an Access mdb
file" ? I'm not sure you can do that, but you can certainly get data out
of an mdb file and display it in a browser or stream it to a file.

Quote:

> I am trying to write a VB Script to run on a Win 95 workstation that can
> make changes to the structure of an Access mdb file on a machine that does
> not have access installed.

> I don't seem to be able to find a syntax that allows me to connect to the
> mdb file.

> I know that DAO allows such connectivity, but I don't know if VB Script can
> accomplish the connection, or if one has to develop a full Visual Basic
> Application.

> Any help appreciated.

> Kyle Roth


--
Gerry Hickman (London UK)
http://www.gerry1.dircon.co.uk/


Sat, 09 Nov 2002 03:00:00 GMT  
 Can VBScript under WinScriptHost connect to Access db without Access being installed on the workstation
Thanks for your reply.  What I need to be able to do is add some tables and
modify some fields and attributes.  This can be done through DAO in a full
Visual Basic Application.  What I am trying to do is accomplish it using
VBScript and the Windows Scripting Host.  So far, I seem to be failing in
establishing the basic connectivity to the database.  I don't know if it is
a syntax problem or if WSH simply does not support this functionality
through VBScript.  If you have any info, it would be appreciated.

Thanks.

Kyle Roth



Sat, 09 Nov 2002 03:00:00 GMT  
 Can VBScript under WinScriptHost connect to Access db without Access being installed on the workstation
Does the following VBScript snippet help you?
--dudley

Set dao = CreateObject("DAO.DBEngine.35")
' optional: dao.SystemDB = "C:\winnt\system32\system.mdw"
set ws = dao.CreateWorkspace( "", "WatchDog", "MyPassword")
set db = ws.OpenDatabase( "Forecast.mdb")
qryFlows = "Select * from flows where stationID=1100"
Set rs = db.OpenRecordset( qryFlows)

...etc...



Sat, 09 Nov 2002 03:00:00 GMT  
 Can VBScript under WinScriptHost connect to Access db without Access being installed on the workstation
Microsoft ADOX Programmer's Reference
http://msdn.microsoft.com/library/psdk/dasdk/adod50s7.htm

--
Michael Harris
MVP Scripting

Thanks for your reply.  What I need to be able to do is add some tables and
modify some fields and attributes.  This can be done through DAO in a full
Visual Basic Application.  What I am trying to do is accomplish it using
VBScript and the Windows Scripting Host.  So far, I seem to be failing in
establishing the basic connectivity to the database.  I don't know if it is
a syntax problem or if WSH simply does not support this functionality
through VBScript.  If you have any info, it would be appreciated.

Thanks.

Kyle Roth



Sat, 09 Nov 2002 03:00:00 GMT  
 Can VBScript under WinScriptHost connect to Access db without Access being installed on the workstation

Quote:
> Microsoft ADOX Programmer's Reference
> http://msdn.microsoft.com/library/psdk/dasdk/adod50s7.htm

Thanks, Michael. Kyle (and the rest of the scripting world) should take the
plunge and learn ADOX instead of using DAO. They'll be glad they did some
day. Kyle, once you figure out the ADOX.Catalog object, with some
experimentation you'll see you can create and modify tables pretty easily
with the ADOX.Table object. Caveat: there are some differences in
capabilities of ADOX between Jet 3.51, Jet 3.6, and Jet 4.0.

--dudley



Sat, 09 Nov 2002 03:00:00 GMT  
 Can VBScript under WinScriptHost connect to Access db without Access being installed on the workstation
Thanks a million.  This didn't quite do the job, but it ultimately gave me
enough direction to find the answer in the maze of Microsoft's online
documentation.  You code snippet fails because DAO is not necessarily
available on a Windows workstation, but ADO is, and I eventually found the
documentation and code samples to accomplish what I needed to.

Kyle Roth



Fri, 29 Nov 2002 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Can VBScript under WinScriptHost connect to Access db without Access being installed on the workstation

2. Connect Access DB use vbscript

3. Connect to Secure Access DB with ADO

4. Wildcard syntax for DTC parameter connected to access db

5. URGENT--connecting to MS Access DB and finding PROVIDER

6. Connecting to a query stored in Access db

7. Looking for an ActiveX Control to access a local Access db

8. HELP on accessing Access DB in VB scripts !!

9. Please post a sample for accessing MS Access 2000 db

10. HOWTO: Download Access DB With OCX That Manages That DB

11. HOWTO: Download Access DB With OCX That Manages That DB

12. edit access db from a vbscript

 

 
Powered by phpBB® Forum Software