Problem reading from database

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello. I have app written in C# that we are testing. The executable is
shared on our network. The method we are testing is a call to a foxpro
table. The call is made to query the table, then fill a datable with the
resultset. All is fine when I run the executable from my machine. However,
when our test user runsthe same executable, the app errors out when
attempting to read from the foxpro table. I have logged where the user
connects to the database, but a rather unhelpfull error dialog is returned:
Attempted to read or write protected memory. This is often an indication
that other memory is corrupt. I have narrowed this error occuring at the
data-adapter.FILL method(data-table). What I'm at a loss is why the error
occurs while our user tests this method, yet does not fail when I test. I
have ensured that our user has .NET 2.0 and has READ permission for the fox
pro table.

Any thoughts or ideas, something missing that is required for foxpro or ADO?
 
Toco

I changed the subject and trying to make this visible to the FoxPro guys and
especially girls.

You can try this as well in a FoxPro newsgroup, there are very much people
active who know about Net programming.

Cor
 
Thanks Cor!

Toco,

It really helps to post your connection string and the code you are using.
Also, be sure the user has the latest FoxPro and Visual FoxPro OLE DB data
provider, downloadable from msdn.microsoft.com/vfoxpro/downloads/updates .

If you write a really simple (console) app to access a single table do you
have this problem? Does it occur on any particular table or on all of them?
What is the data structure of your table? Does it happen if you make a
really simple DBF and work against that table? ( sqlCommand = "Create Table
MyTable (Field1 I, Field2 C(10))" )

This error appears to be a .NET error and is not limited to accessing FoxPro
tables. A Google search on "Attempted to read or write protected memory"
brought up a lot of threads, and if you go over these you may find something
that fits your situation. Among the suggestions is that .NET doesn't work
correctly with some data types and also that uninstalling/reinstalling the
..NET framework may help. I haven't seen a concrete answer that is a total
fix for the issue.
 
Back
Top