Insert dataset to another database
- From: "JPM" <jpm@xxxxxxxxxxx>
- Date: Tue, 10 Apr 2007 17:29:47 -0500
Hello,
Using VB6/ADO, I'm thinking I can create a recordset and insert it into
another table in a different Jet database, all within the execution of a
single query. But, I can't seem to get it to work, even in an experiment in
Access 2K.
My sql in Access 2K:
SELECT D.lorder as Ord, A.Lorder
FROM [;Database = C:\MyDocuments\Acc2K\Wrk.mdb].OrdersData as A INNER JOIN
[;Database = C:\Access\Work\Sales06.mdb].Detl1 as D On D.Lorder = a.lorder
WHERE ((D.fg)= 'MXX-NC' Or (D.fg)= 'MXX.NC');
If I've the Sales06 database file open and am working in it I shouldn't have
to specify that database path in the query, I'm theorizing, but regardless
whether I do or don't I get the error "No database specified in connection
string or IN string". I haven't set this up in VB yet, but I don't see why I
should bother if it won't work as an MsAccess query.
I know I mentione the idea of Inserting the result into a table of another
database; I can't even get a select across 2 Jet databases to work. BUT,
I've found examples from people like Doug Steele that apparently work.
'SELECT A.ExpenseID, A.JobID, B.Category
'FROM [;DATABASE=C:\LocumTE\LocumTEData.mdb].[Expense] AS A
' INNER JOIN [;DATABASE=C:\time&expense\time&expensedata.mdb].[Expense] AS
B
' ON A.ExpenseID = B.ExpenseID
Question is, what am I doing wrong with my version of this query?
Should I also post this to an Access newsgroup?
Thanks for any input,
Jim
.
- Follow-Ups:
- Re: Insert dataset to another database
- From: Earl
- Re: Insert dataset to another database
- Prev by Date: Re: .mdb in Vista public folder
- Next by Date: Cascading Delete not Cascading
- Previous by thread: .mdb in Vista public folder
- Next by thread: Re: Insert dataset to another database
- Index(es):
Relevant Pages
|
|