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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pull data in VFP from a query held in a MDB 2

Status
Not open for further replies.

gbettle

Programmer
Nov 23, 2005
33
DK
Howdy all,

Hope this message finds you all well.

Over on the Profox list, someone has asked the above question. Does anyone have any such experience?

Many thanks!

Cheers,

Garry
 
Code:
sqlh = SQLSTRINGCONNECT("Driver={Microsoft Access Driver (*.mdb)};Dbq=YuorAccessDBNameHere.MDB;Uid=Admin;Pwd=;" )
SQLEXEC(sqlh,[SELECT * FROM AccessView],[crsVfp])
Not tested and not a single error checking :)

Borislav Borissov
 
Thanks Borislav,

I'll pass it on, but I think they want to run a stored Access Query (Queries?) quite often.

Any thoughts?

Cheers,

Garry
 

Garry,

I think Borislav's code may be OK -- provided the SELECT refers to the name of the query, rather than a table.

I believe MDB-resident queries are similar to VFP's views, and should be visible across the ODBC interface. But I might be wrong.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Thanks Mike\Borislav,

I've passed it all on. I don't have Access on this machine so I can't confirm it. I'll have to wait for some more feedback.

Cheers,

Garry
 
Be wary. There might be data loss on decimal precision, and extreme dbf bloat if the MDB doesn't have a designed structure... e.g. even a small char field might come in as a 255 char field (or even a memo), so it may not scale well.

Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top