Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DSN Not working
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
00742132
Message ID:
00742145
Views:
25
Timothy,

For VFP data, I would recommend using the OLE DB provider. It has been enhanced for better interop with .NET.

>cannot seem to get a system DSN to work for me for my VisualFoxPro
>Database. I am using the following code which works fine in my Windows App.
>
>Dim cn As New OdbcConnection("DSN=VAM")
>Dim cmd As New OdbcCommand("select nprice from icitem where citemno =
>'A20001'", cn)
>Dim da As New OdbcDataAdapter(cmd)
>Dim ds As New DataSet()
>cn.Open()
>da.Fill(ds, "Price")
>lblTest.Text = ds.Tables("Price").Rows(0).Item(0)
>cn.Close()
>
>I am getting an error in ASP.Net. I do not have any other DSN's with the
>same name (User or file), I am running under administrator's identity for my domain in the
>web.config file. Still I get this error:
>
>ERROR [S1000] [Microsoft][ODBC Visual FoxPro Driver]Cannot open file
>g:\vam\data\nps\amw.dbc. ERROR [IM006] [Microsoft][ODBC Driver Manager]
>Driver's SQLSetConnectAttr failed ERROR [01000] [Microsoft][ODBC Driver
>Manager] The driver doesn't support the version of ODBC behavior that the
>application requested (see SQLSetEnvAttr).
>
>
>
>ANY HELP!!
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform