473,466 Members | 1,470 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 2145
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 * * ...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.