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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
Word Database Field
|
Thread Tools | |
Display Modes | |
|
|