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?
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?