Strange Problem Occured Using C#&Access

  • Thread starter Thread starter Xian Xu
  • Start date Start date
X

Xian Xu

I'm having "strange" problem with accessing MS Access database from
C#.Net. First of all, I develop using VS.Net 2003, C#, Crystal Report for
VS.Net 2003 and MS Access 2003 in this project (standalone application).
This project uses C# and Ado.Net OleDB for database connection and crystal
report for report generating. I used Wise Installation program for
creating installation package, however, I don't think my problem is with
Wise. Access database is stored in Access 2000 format.

My development system is Windows Server 2003. Everything works fine on my
development machine, until deploy. I have succeeded in deploying it to
another vanilla Windows Server 2003 with zero problem. However, when I
tried to deploy on some Windows XP machine, I have some strange things
happening.

1. On one machine (winxp, sp1) with MS Access 2000 installed, my program
can't access database. Only until I use the Access 2000 "repair"
functionality to repair my database. After that, the code works fine.
2. On some machine, even after repair, still code can't access database.
3. It seems that my code (c#) can access some tables, while can't access
others. I have only 1 db file storing all data. The symptom is my program
can read user information from the database file (used for log in), but
after I logged in, subsequent calls to get more data failed.
4. On some machines, it worked alright, until upgrading to Office 2003 or
Office 2002 SP2->SP3.

Some more info:
1. The failed sql query: select * from Job where 1=1 and UserId = 1 order
by JobTitle
2. The failed sql connection string: Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=Default.mdb;Jet OLEDBatabase Password=Some

Judging from the fact that the program works in some machines yet fails on
others, I assume it's some configuration problem, or some missing
components. Experts, any ideas?
 
All of the "Access" groups are for issues with the Access interface and
programming.

Using an mdb file for data storage is not really using Access. It is using
the Jet data portion of the mdb file.

..NET issues, especially C# issues, will be better address in one of the 49
..NET groups that all start with microsoft.public.dotnet.

I'd start with the microsoft.public.dotnet.languages.csharp group.

After that, you might try microsoft.public.dotnet.datatools and
microsoft.public.dotnet.framework.adonet.

Good luck.

Sco


I'm having "strange" problem with accessing MS Access database from
C#.Net. First of all, I develop using VS.Net 2003, C#, Crystal Report for
VS.Net 2003 and MS Access 2003 in this project (standalone application).
This project uses C# and Ado.Net OleDB for database connection and crystal
report for report generating. I used Wise Installation program for
creating installation package, however, I don't think my problem is with
Wise. Access database is stored in Access 2000 format.

My development system is Windows Server 2003. Everything works fine on my
development machine, until deploy. I have succeeded in deploying it to
another vanilla Windows Server 2003 with zero problem. However, when I
tried to deploy on some Windows XP machine, I have some strange things
happening.

1. On one machine (winxp, sp1) with MS Access 2000 installed, my program
can't access database. Only until I use the Access 2000 "repair"
functionality to repair my database. After that, the code works fine.
2. On some machine, even after repair, still code can't access database.
3. It seems that my code (c#) can access some tables, while can't access
others. I have only 1 db file storing all data. The symptom is my program
can read user information from the database file (used for log in), but
after I logged in, subsequent calls to get more data failed.
4. On some machines, it worked alright, until upgrading to Office 2003 or
Office 2002 SP2->SP3.

Some more info:
1. The failed sql query: select * from Job where 1=1 and UserId = 1 order
by JobTitle
2. The failed sql connection string: Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=Default.mdb;Jet OLEDBatabase Password=Some

Judging from the fact that the program works in some machines yet fails on
others, I assume it's some configuration problem, or some missing
components. Experts, any ideas?
 
Thank you for the info. I posted here primarily because I thought it has
things to do with Access version and all the security patches for Access..
 
Thank you for the info. I posted here primarily because I thought
things to do with Access version and all the security patches for
Access.

Maybe, sort of. 'Jet' version and security patches for 'MDAC'
But using Access to look at the files, we don't get the
same errors or error messages that you get using C#.

(david)


Thank you for the info. I posted here primarily because I thought it has
things to do with Access version and all the security patches for Access.
 
Bump. Anyone has some ideas? Here's more info on the versions of software
I installed. On a problematic winxp sp1, MS Jet 4.0 SP8 installed with the
4.0.8618.0 security patch. For MDAC, 2.8 installed with file
ENU_Q832483_MDAC_x86 security patch. The Access file is in Access 2000
format, generated using Office 2003. Anything else I'm missing?
 
I updated all the security patches I know of. Now, on a problematic winxp
sp1 box, the follwoing installed.
MS Jet 4.0 SP8 installed with the 4.0.8618.0 security patch.
MDAC 2.8 installed with file ENU_Q832483_MDAC_x86 security patch.

The Access file is in Access 2000 format, generated using Office 2003.
Anything else I'm
missing?

In this configuration, my program still not working.
 
Back
Top