Word Database Field

V

vree

Win2000/Access2000/WinXPPro

I have this Database field in Word 2000
{
DATABASE \d "C:\\VictoriasStuff\\DBTestWord\\Northwind.mdb
\c"DSN=MSAccess Databases;DBQ=C:\
VictoriasStuff\\DBTestWord\\Northwind.mdb;DRIVERId=25;FIL=RedISAM" \
"SELECT 'OrderID','CustomerID' FROM 'ORDERS' WHERE (('CustomerID'
'ALFKI'))" \h }
But am getting Error! Cannot connect to data source. What have I don
wrong? I got this idea here near the bottom of article unde
One-To-Many relationships; plus Word Help on Database field states th
same thing.

'MSDeveloperNetwork' (http://tinyurl.com/28fe5
 
P

Peter Jamieson

The most likely problem is that you are using the same type of single quotes
throughout your SELECT statement. In fact, you need two types:

` (an "opening" single quote. (If you go to Insert|Symbol in Word, it is
character no. 96, the one before lowercase "a", I think). This should be
used where necessary to quote table and field names, i.e. everything in this
statement except ALFKI. (In fact in this case you probably do not need these
quotes at all, and if you prefer, you can /probably/ surround the names
using [] instead.)
' (a "straight" single quote. (character 39, the character before "(" ) to
surround "string literals" such as ALFKI
 
V

vree

Solution:

The MSN Developer article, while good, as usual the writer assumes th
novice knows everything, and I have to give them, they did include th
line (be sure to Link!). Took me a couple of hours to figure out
there is a check box, Link As Field, which does the trick. Lesson wil
never be forgotten
 
C

Cindy M -WordMVP-

Hi Vree,
The MSN Developer article, while good, as usual the writer assumes the
novice knows everything
As the guilty party :):

this article was originally written for the Microsoft Office Developer
magazine; MSDN is also a developer site. So yes, the authors of
developer articles assume that the reader is NOT a novice, but a
developer.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 

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