Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trouble INSERTing INTO and external mdb table 1

Status
Not open for further replies.

VickyC

Technical User
Joined
Sep 25, 2010
Messages
206
Location
CA
hello to all

I'm puzzled as to why my code doesn't work. Here's the code...

Code:
INSERT INTO [;Database = C:\Users\VC\Desktop\tRef\tRef___TEST.mdb].tbl_TEST_DATA___VC6  (Model, K, S, R, ID, D_R, D_L) 
SELECT Q.FirstOfModel, Q.KT, Q.KS, Q.RSS, Q.ID, Q.SumOfDist_R, Q.SumOfDist_L
FROM qryTEST AS Q;

I get the "You are about to Append..." prompt, then the error message "No database specified in connection string or IN clause.".

I've checked a hundred times - TABLE: tbl_TEST_DATA___VC6 really is in mdb File: tRef___TEST.mdb having the Path specified. I can't figure out why I keep getting the error message. The destination table really is there!

(When I remove the INSERT INTO line, the SELECT query runs perfectly)
 
What about this ?
INSERT INTO tbl_TEST_DATA___VC6 IN 'C:\Users\VC\Desktop\tRef\tRef___TEST.mdb' (Model, K, S, R, ID, D_R, D_L)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
hi PHV

That gave a 'Syntax Error in INSERT INTO Statement', but this slight modification worked...

INSERT INTO tbl_TEST_DATA___VC6 (Model, K, S, R, ID, D_R, D_L) IN 'C:\Users\VC\Desktop\tRef\tRef___TEST.mdb'

Thanks for pointing in the right direction. Vicky C.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top