Information générale
Catégorie:
Bases de données
Here is a message that I posted on another thread. Hopefully it clarifies....
<----------------------------------------------------------------->
I am trying to get an asp.net app that was written in VS 2k2 to work with the .NET Framework. I opened the project using the new C# visual studio and compiled it. I ran it on a server that still was running .NET 1.0, and it worked fine.
I installed 1.1 on the server, now I am having problems related to the OleDbDataAdapter's fill() method. When I set breakpoints I found that it never returns from the fill() call. The app accesses a foxpro database.
I ran aspnet_regiis -ua, and aspnet_regiis -i to make sure that it was using the 1.1 version of the framework. I gave access of the data directory to 'ASPNET' and 'IUSR_'.
OleDbConnection myConnection = new OleDbConnection();
myConnection.ConnectionString = ConfigurationSettings.AppSettings["UsersTable"];
// the ConnectionString="Provider=vfpoledb;Data Source=C:\\ars5\\ims5\\data\\ims5.dbc"
OleDbDataAdapter myCommand = new OleDbDataAdapter("select * from users where upper( alltrim( username ) ) == '" + cUserName.ToUpper() + "'", myConnection);
// create a dataset and fill it with our selected record(s)
DataSet ds = new DataSet();
myCommand.Fill(ds, "UsersTable"); // <---- Where it gets stuck.
Thanks
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement