A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Word Database Field



 
 
Thread Tools Display Modes
  #1  
Old May 3rd, 2004, 06:28 PM
vree
external usenet poster
 
Posts: n/a
Default Word Database Field


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" \s
"SELECT 'OrderID','CustomerID' FROM 'ORDERS' WHERE (('CustomerID' =
'ALFKI'))" \h }
But am getting Error! Cannot connect to data source. What have I done
wrong? I got this idea here near the bottom of article under
One-To-Many relationships; plus Word Help on Database field states the
same thing.

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


------------------------------------------------
~~ Message posted from http://www.WordForums.com/
  #2  
Old May 4th, 2004, 09:48 AM
Peter Jamieson
external usenet poster
 
Posts: n/a
Default Word Database Field

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

--
Peter Jamieson

"vree" wrote in message
...

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" \s
"SELECT 'OrderID','CustomerID' FROM 'ORDERS' WHERE (('CustomerID' =
'ALFKI'))" \h }
But am getting Error! Cannot connect to data source. What have I done
wrong? I got this idea here near the bottom of article under
One-To-Many relationships; plus Word Help on Database field states the
same thing.

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


------------------------------------------------
~~ Message posted from http://www.WordForums.com/



  #3  
Old May 4th, 2004, 02:22 PM
vree
external usenet poster
 
Posts: n/a
Default Word Database Field


Solution:

The MSN Developer article, while good, as usual the writer assumes the
novice knows everything, and I have to give them, they did include the
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 will
never be forgotten.


------------------------------------------------
~~ Message posted from http://www.WordForums.com/
  #4  
Old May 5th, 2004, 08:40 AM
Cindy M -WordMVP-
external usenet poster
 
Posts: n/a
Default Word Database Field

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 :-)

  #5  
Old May 5th, 2004, 10:01 AM
vree
external usenet poster
 
Posts: n/a
Default Word Database Field

Everything is working fine as is.


---
Message posted from http://www.ExcelForum.com/

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.