472,965 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,965 software developers and data experts.

Problem reading from database

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?
Jul 3 '06 #1
2 2119
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
"Toco" <To**@discussions.microsoft.comschreef in bericht
news:A8**********************************@microsof t.com...
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?

Jul 4 '06 #2
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.

--
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
ci***@cindywinegarden.com
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:O4**************@TK2MSFTNGP03.phx.gbl...
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
"Toco" <To**@discussions.microsoft.comschreef in bericht
news:A8**********************************@microsof t.com...
>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?


Jul 5 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Dariusz | last post by:
Below is part of a code I have for a database. While the database table is created correctly (if it doesn't exist), and data is input correctly into the database when executed, I have a problem...
4
by: NohaKhalifa | last post by:
Dear All; I'm developing a web site and i need to make adminisration for this site it's a site for Real Estates . But I don't need the administration to be online .. I want them to fill data...
7
by: Graham Taylor | last post by:
I've tried posting this in the 'microsoft.public.access' but I will post it here also, as I think it might be the webserver which is causing my problem. --------- I have an Access 2003 database...
5
by: rob | last post by:
Hi to all. I am pretty new to using Access and am having a problem I hope someone can help me with. I want to access a MS-Access database from a web page. I have managed to get it "sort" of...
7
by: jsale | last post by:
I'm currently using ASP.NET with VS2003 and SQL Server 2003. The ASP.NET app i have made is running on IIS v6 and consists of a number of pages that allow the user to read information from the...
1
by: needin4mation | last post by:
Hi, I am uploading a file and changing a record in a database. When the database is updated, I retrieve the last_insert_id() to get the latest row key. I also have a Page_Load event that...
22
by: b_r | last post by:
Hi, I'm trying to make a simple operation (insert into DB) in VB 2005 and SQL Server. The code is as follows: Dim sConnectionString As String = _ "Data...
9
by: HC | last post by:
Hello, all, I started out thinking my problems were elsewhere but as I have worked through this I have isolated my problem, currently, as a difference between MSDE and SQL Express 2005 (I'll just...
0
by: nrip | last post by:
Dear All, I am facing a very peculiar problem. I am reading a CSV file from my JSP code and trying to insert them into MYSQL database. the program first reads a line and then splits it into words...
11
by: aljaber | last post by:
hi, i am facing a problem with my program output here is the program /*********************************************\ * CD Database * * ...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.