Kent Belan wrote:
> Hello,
> I need to read an Access MDB data file from VFP9,
>
Here's some code that works for me:
SET CONSOLE OFF
SQLDISCONNECT(0)
cStr=[Provider="Microsoft.Jet.OLEDB.4.0";]
cStr=cStr+"Driver={Microsoft Access Driver (*.mdb)};;
DBQ=&gcTable;"
?SQLSTRINGCONNECT(cStr)
?SQLTABLES(1,"'TABLE'",'curTabs')
?SQLEXEC(1,[ ;
SELECT *;
FROM <AccessTable> ;
],'<cursorname>')
SET CONSOLE ON
SET SAFETY OFF
CREATE SQL VIEW <viewname> AS ;
SELECT <fieldnames> ;
FROM <cursorname>
SET SAFETY ON
Hopefully making it "generic" didn't take the important parts out.
Any criticism welcome...
--
Regards,
Chester Friesen
Friesen Computer Company
Willows, CA
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.