PC Review


Reply
Thread Tools Rate Thread

Alternate way to open to a client's mdb who does not have Access.

 
 
=?Utf-8?B?QVd5c3ppbnNraQ==?=
Guest
Posts: n/a
 
      31st May 2007
Hi,
Im just wondering if there is a better way than using Visdata on the
client's pc to go into his mdb to fix his tables. We have an app that uses
Access mdbs for the database and when we connect to remotely to fix a problem
are currently using Visdata.

Thanks,
Alan
 
Reply With Quote
 
 
 
 
'69 Camaro
Guest
Posts: n/a
 
      31st May 2007
Hi, Alan.

> Im just wondering if there is a better way than using Visdata on the
> client's pc to go into his mdb to fix his tables.


One could use VB Script, which is free and fairly simple if one knows how to
write queries. For example, the following code saved as the file
AddFKeyToTable.vbs would allow one to double-click the script file and
thereby add a foreign key to the tblProducts table in the C:\Work\MyDB.mdb
database file:

Dim cnxn
Dim sDBPath

sDBPath = "C:\Work\MyDB.mdb"

Set cnxn = CreateObject("ADODB.Connection")
cnxn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
sDBPath & ";Persist Security Info=False"
cnxn.Execute "ALTER TABLE tblProducts " & _
"ADD CONSTRAINT tblSupplierstblProducts_FK " & _
"FOREIGN KEY (SupplierID) REFERENCES tblSuppliers SupID;"
cnxn.Close

Set cnxn = Nothing

If an index or an extra column was needed, then the SQL statement of the
query could easily be changed and the rest of the VB Script would remain the
same. The users don't have to be out of the database, but the script
requires a table lock, so no users can be using the table when it's being
altered by the script.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blogs: www.DataDevilDog.BlogSpot.com, www.DatabaseTips.BlogSpot.com
http://www.Access.QBuilt.com/html/ex...ributors2.html for contact
info.


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting for alternate client refs =?Utf-8?B?U2FyYWggKE9HSSk=?= Microsoft Excel Worksheet Functions 4 25th Jul 2007 12:46 PM
Re: Client defaulting to alternate DNS server JustinPayne Microsoft Windows 2000 DNS 1 30th Aug 2005 07:02 PM
How to open alternate shared calendars =?Utf-8?B?Sm9lIFVnbHk=?= Microsoft Outlook Calendar 0 9th Dec 2004 07:17 PM
WinXP client Machines can not open Access 2000 files on Win2K server Amir Microsoft Windows 2000 Applications 0 3rd Nov 2003 09:14 PM
'File Not Found' on alternate open Wilma Mackay Windows XP General 0 13th Aug 2003 04:54 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:08 AM.