Lynda,
>OpenRowSet() and perhaps even OpenQuery() appear to have possibilities, if
Here is an example for you. It may be easiest if you just copy the following into Query Analyzer and try it out.
SELECT * INTO #curEmployee
FROM
OPENROWSET('MSDASQL','DRIVER=Microsoft FoxPro VFP Driver (*.dbf);SourceType=DBF;
SourceDB=C:\Program Files\Microsoft Visual FoxPro 7\Samples\Data;Exclusive=No;Deleted=No;BackgroundFetch=No',
'SELECT * FROM Employee')
select emp_id,last_name,first_name from #curEmployee order by last_name
DROP TABLE #curEmployee
Notes :
I'm doing this with a free table by specifying Sourcetype=DBF and giving a path in the SourceDB. You can use a DBC also by specifing Sourcetype=DBC and then naming the DBC in the SourceDB.
The path you use in SourceDB must be available from your SQL server. UNCs are allowable.
If you have to pass parameters to be used in the 'SELECT * FROM Employee' statement, there seems to be some tricks to that as well. I could give you an example if you decide to go this route.
Good luck,
Anthony
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only