Posted by Jchick on 10/02/84 11:44
This outta be an easy one for someone. I have the following code in my
trigger. I am trying to connect to a DSN that is pointing to an Access
database (.mdb). However, I am not sure how to actually write the
Select From statement (see "A DSN I MADE" in the code below).
Any hints as to how I reference a DSN in the select statement?
Thanks in advance
Chick
============start of trigger===========
CREATE TRIGGER [Populate Customer Name] ON [dbo].[Invoices]
FOR INSERT, UPDATE
AS
DECLARE @InvoiceNo VARCHAR(20)
DECLARE @VendorName VARCHAR(50)
SELECT @InvoiceNo = (select InvoiceNo from inserted)
SELECT @VendorName = (select VendorName from "A DSN I MADE" where
InvoiceNo = @InvoiceNo)
Update Invoices
set VendorName = @VendorName
where F_DocumentID = (select F_DocumentID from inserted)
Navigation:
[Reply to this message]
|