[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.odbcnet

Problems with Microsoft.Data.Odbc package en C#

Gérald Reinhart

11/20/2002 8:46:00 AM


try
{
Microsoft.Data.Odbc.OdbcCommand _SqlCommand = new
Microsoft.Data.Odbc.OdbcCommand ();
_SqlCommand.CommandText = dbEnregistrement.sqlInsert;
_SqlCommand.Connection = this.mConnectionProvider.connection;
_SqlCommand.CommandType = System.Data.CommandType.Text ;
_SqlCommand.ExecuteNonQuery() ;

this.mSortedList.Add( dbEnregistrement.sqlPrimaryKey,
dbEnregistrement );

}
catch (DBEnregistrementException eEnregistrement )
{
throw eEnregistrement;
}
catch ( Exception e )
{
throw new DBException("DBColEnregistrement.dbInsert" , e) ;
}


INSERT INTO communique (id_communique, titre, flux_html,
date_debut_publication ,date_fin_publication, index_ordonnancement, etat,
id_theme, id_sous_theme) VALUES (2, 'dsg', 'dsg', Null, Null, Null, 'sdg',
Null, Null )

{"ERROR [HY000] [Microsoft][Pilote ODBC Microsoft Access] L'opération doit
utiliser une requête qui peut être mise à jour." }


1 Answer

(David Sceppa)

11/21/2002 9:40:00 PM

0

Gérald,

This is a common ASP.NET / Access database issue. The
ASP.NET account probably doesn't have read/write access to the
directory in which your .mdb file resides. Give the account
read/write permissions to the directory and you should be able to
issue your INSERT INTO query successfully.

I hope this information proves helpful.

David Sceppa
Microsoft
This posting is provided "AS IS" with no warranties,
and confers no rights. You assume all risk for your use.
© 2002 Microsoft Corporation. All rights reserved.