vb.net with Access

G

Guest

helloo
am using visual studio 2003 and office 2003. this is not the first time it
happens. everytime i connect a program made in visual basic to an access
database i can read from the database but i cant write to it i.e. i cant add
rows to the tables (i cant update the tables ) but if i get an access
database from the interent (any website that have those small programs to
show how does it work) i can write to it which means my code is working and
the problem is with the database. what is the problem with my office is
there any files that are missing coz those databases that i get from the
internet and test on them the write process it works only if i dont
edit them as if i just change one thing in it and save it it will not work
so plzzzzzzzzzzzz help.

regards to all and thanx for those who's gonna answer in advance
 
B

Brendan Reynolds

The most common cause of this problem is that the identity under which your
code is being executed does not have the necessary read, write and delete
permissions on the folder where the database is stored.

I'm guessing that the sample databases you downloaded are in your download
folder, which is usually a sub-folder of the documents folder. Try copying
one of those sample databases into the same folder as one of the databases
you're having a problem with, and/or copying one of the databases you're
having a problem with into the same folder as one of the databases you're
not have a problem with. That should enable you to determine whether the
problem is related to folder permissions or not.
 
G

Guest

hej brendan
i have full permission on all of the computer starting from that i am the
administrator of the computer. second i am running both databases form the
same folder which is the visual studio folder on my documnets. third the
database that does not work i make it myself with microsoft access so i will
be the only owner of that database. it is strange isnt it? the problem is
that the database that i make in my computer "i think" misses something that
exist on other databases or may be my office packet misses something. anyway
thanx for replying.
 
B

Brendan Reynolds

Well, the issue is not your permissions, but the permissions of the identity
under which the code is executed. These are not necessarily the same thing.
For example, ASP.NET apps will by default execute using the ASPNET account
(or NetworkService account in Windows Server 2003).

What exactly happens when you try to write to one of these databases? Is
there an error message?
 
G

Guest

hey brendan again
the problem is that there is no erroe message otherwise i will find a way
out and as i told u the information i try to save to the database just does
not get saved i can read what ever in the database and it's tables but i cant
save to them but whenever i get a database from the interent i just can do
everything like saveing and reading but when i try to edit the working
database with my access it stop accepting data as the case with the first
one. i hope u got the idea. i am using windows xp sp2 with both visual studio
version 2003 and visual studio 2005 and microsoft access 2003 and access
2000.
 
B

Brendan Reynolds

Sorry Ahmed, I'm afraid I'm unable to follow your description of the
problem.
 
G

Guest

I just read on the VB NET forum that in testing mode the IDE copies the
original database everytime thus erasing your changes. Maybethis feature
somehow be the problem?
 
G

Guest

hej for brendan and investordrew
i just solved the problem by changing the name of one of the columns in the
table as it was (monthname) and i changed it into (monthnamn) and it worked.
i dont know if this , i mean monthname, is one of the forbidden words in
access.anyway i just wanted u to be informed for future help. and thanx again
 
B

Brendan Reynolds

'MonthName' is not a reserved word, but it is the name of a Visual Basic
function. It's probably possible to work around any problems that might be
caused by using it as a column name, but if you are in the early stages of
development and don't mind changing the name, that's probably the easiest
solution.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top