G
Guest
Hello
I used C# for ASP.NET and used ADO.NET to connect Access 2003 file. Every thing was ok, when I used "Select" instructions. But, when I want to "Write" the database, like "Delete and Insert", the error was happen. I checked the file and IIS, it's not readonly. Dose anyone want to help me
The codes is here
OleDbConnection Conn
OleDbCommand Command
string ConnectionStr
ConnectionStr = "Data Source=C:\\Inetpub\\wwwroot\\\\Data\\Test.mdb;Provider=Microsoft.Jet.OLE"
"DB.4.0"
Conn = new System.Data.OleDb.OleDbConnection(ConnectionStr)
string queryStr="delete from UserData where ID='exUser'"
Command = new OleDbCommand()
Command.Connection=Conn
Command.CommandText=queryStr
Conn.Open();
Command.ExecuteNonQuery()
Conn.Close();
I used C# for ASP.NET and used ADO.NET to connect Access 2003 file. Every thing was ok, when I used "Select" instructions. But, when I want to "Write" the database, like "Delete and Insert", the error was happen. I checked the file and IIS, it's not readonly. Dose anyone want to help me
The codes is here
OleDbConnection Conn
OleDbCommand Command
string ConnectionStr
ConnectionStr = "Data Source=C:\\Inetpub\\wwwroot\\\\Data\\Test.mdb;Provider=Microsoft.Jet.OLE"
"DB.4.0"
Conn = new System.Data.OleDb.OleDbConnection(ConnectionStr)
string queryStr="delete from UserData where ID='exUser'"
Command = new OleDbCommand()
Command.Connection=Conn
Command.CommandText=queryStr
Conn.Open();
Command.ExecuteNonQuery()
Conn.Close();