error OleDb.OleDbException migrating on 2.0

C

Christophe Sauvage

Hello,

I have the version 2.0 of framework.
And i have an error message on a developpment who work on 1.1 :

Exception Details: System.Data.OleDb.OleDbException: Erreur non spécifiée
Source Error:
Line 25: DataSet myDataSet = new DataSet("Entreprise");
Line 26:
Line 27: myDataAdapter.Fill(myDataSet,"Entreprises");


Here is my code :
string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +
(Server.MapPath("/data/planning.mdb"));
OleDbConnection conn = new OleDbConnection(connectionString);
OleDbDataAdapter myDataAdapter = new OleDbDataAdapter("Select * from
Entreprises",conn);
DataSet myDataSet = new DataSet("Entreprise");
myDataAdapter.Fill(myDataSet,"Entreprises");
....

This method still work on asp.net 2.0 ?
 
W

William \(Bill\) Vaughn

It would help to know what exception is thrown.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
C

Christophe Sauvage

Yes it would help. But the message of the server is :
"Exception Details: System.Data.OleDb.OleDbException: Erreur non spécifiée"
Erreur non spécifiée = error no specify
 
W

William \(Bill\) Vaughn

Did you setup a try/catch exception handler to trap the exception display
the message?

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
C

Christophe Sauvage

with try/catch exception handler i have :

System.Data.OleDb.OleDbException: Erreur non spécifiée at
System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString
constr, OleDbConnection connection) at
System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningObject) at
System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection
owningConnection, DbConnectionPoolGroup poolGroup) at
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection) at
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) at
System.Data.OleDb.OleDbConnection.Open() at
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[]
datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand
command, CommandBehavior behavior) at
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String
srcTable) at ASP.admin_planning_accueil_aspx.Page_Load(Object sender,
EventArgs E) in h:\Planning\Admin_Planning\accueil.aspx:line 27
 
C

Christophe Sauvage

Ok. I find.
It was a security problem.
I give the permission to thge folder. And now it's work.
 

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