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

System DSN

Status
Not open for further replies.

roger9991

Programmer
Apr 18, 2009
23
US
I am trying to add a system DSN in ODBC, but all I get is 2 possible choices of MS SQL. I need to access VFP tables using Visual Studio 2010 + ASP.net. I was able to establish a connection string and dataset for Visual Studio 2010 and the VFP tables and I can view the web site on my browser thru ASP.net Development Server but in IIS7 I get an ODBC error that the table cannot be found. Years ago in XP, there were more options for System DSN; all I get now is to use SQL.
 
1) IIS service typically runs as a system user IUSR_computername with limited fileaccess rights. It typically does not need access to anything on a network drive for example and even within the local drives only to IIS related folders. And it's set that way as default.

2) Even in XP the preinstalled foxpro ODBC driver was not the newest. You need to install the latest ODBC driver.

3) You can only work with 32 Bit ODBC drivers, if IIS is the 32 Bit version, otherwise only with 64 bit drivers and there is no foxpro 64 bit ODBC driver.

Bye, Olaf.
 
Thanks Olaf
I just realized that some machines that I use run 64 bit while others are 32 bit.

Do you recommend using VFPOLEDB instead of ODBC when I access VFP tables in VS2010?
 
Roger,

Do you recommend using VFPOLEDB instead of ODBC when I access VFP tables in VS2010?

If your VFP tables were created in VFP 7.0 or later, then you must use the OLE DB provider, not the ODBC driver. The ODBC driver only works for VFP 6.0 and below.

By the way, you've twiced referred to Visual Studio 2010. VFP is not part of Visual Studio, and has nothing to do with ASP.NET. In any case, the choice of OLE DB provider relates to the database, not the development environment.

Hope this helps.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
You need to:
1) Use VFPOLEDB instead of ODBC
2) Be sure the impersonated user have access rights to folder where VFP tables are (VFP is file based)
3) Be sure you compile explicitly targeting x86. Otherwise you cannot use VFPOLEDB which is 32 bits on a 64 bits system. For this one you may try Sybase's ADS driver (ODBC and/or OLEDB) which someone claimed to work in 64 bits.


Cetin Basoz
MS Foxpro MVP, MCP
 
roger

if you are running on a 64 bit version of windows you need to explicitly find and run the 32 bit version of the odbc admin; so rather than find it through control panel look instead for c:\windows\syswow64\odbcad32.exe and double click on that.

hth

nigel
 
I know that VFP9 SP2 is NOT part of Visual Studio. However, I am transitioning over to VS2010 and want to be able to use the VFP tables both in VFP and VS2010/ASP.net4 for a while before I make the complete switch to VS/ASP.net. I love and prefer VFP but VS is much easier for web based applications which everyone seems to prefer.
Is VFPOLEDB only for 32 bit applications?
 
Yes VFPOLEDB is only for 32 bits applications and there is (was) no plan for a 64 bits driver (although I believe foxpro community asked for it and deserved before they pulled the plug).

Cetin Basoz
MS Foxpro MVP, MCP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top