Access2000: ODBC query from VBA - like one in Excel
From: Arvi Laanemets (garbage_at_hot.ee)
Date: 03/29/04
- Next message: Kevin Yu [MSFT]: "RE: Connection to Access DB problem when moving from NT Server to Server2003"
- Previous message: rbutch: "connecting VB dot Net to Oracle 8i"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 29 Mar 2004 11:14:42 +0300
Hi
Does someone here help me with VBA-code for Access2000, which imports data
from FoxPro tables into Access table (overwriting old data), using ODBC
driver for Visual FoxPro Tables. I have equivalent (and working in way I
need) query in Excel, with QueryTable properties like:
.Connection="ODBC;DSN=Visual FoxPro
Tables;UID=;PWD=;SourceDB=T:\DataFolder;SourceType=DBF;Exclusive=No;Backgrou
ndFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;"
.Name="Query from Visual FoxPro Tables"
.Sql/.CommandText= "SELECT a.a1, a.a2, a.a3 FROM table1 a, table2 b
WHERE b.b1 = a.a4 AND ((MONTH(b.b2)=2) AND (YEAR(b.b2)=2004) AND
(a.a2<='060')
The code must access FoxPro tables being in use at same time. So long I have
a code, which imports only whole tables (all fields, without any
conditions), doesn't work whenever table is used or when there are memo
fields in table, and instead overwriting the destination table greates a new
one (when old table is p.e. MyTable, creates MyTable1, and then MyTable2,
etc.), and I'm not happy enough with it :-(((
Thanks in advance
Arvi Laanemets
(When sending e-mail, use address arvil@tarkon.ee)
- Next message: Kevin Yu [MSFT]: "RE: Connection to Access DB problem when moving from NT Server to Server2003"
- Previous message: rbutch: "connecting VB dot Net to Oracle 8i"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|