none
write (insert/update/Delete) data into paradox database RRS feed

  • Question

  • Dear All-

    i wonder if there is a way to write (insert/update/Delete) data into paradox database by using ADO.net or any other way

    because as we know by default reading is allowed only but i try to write into paradox table by using ado.net it didnt succeed

     

    best wishes

    MAYLO

    Monday, October 22, 2007 6:21 PM

Answers

All replies

  • What version of Paradox are you using? What sort of error(s) are you encountering?

     

    Monday, October 22, 2007 6:30 PM
  • I think it is paradox 5.x (all i have is a paradox files with extension *.db so i think it is paradox 5.x)

    and i use this code to update the paradox table

     

    string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Teacher Stuff Data;Extended Properties=Paradox 5.x;";

    OleDbConnection connection = new OleDbConnection(connectionString);

    connection.Open();

    OleDbCommand command = new OleDbCommand("", connection);

    command.CommandText = "update KARIMM set [Field Name]=1 ";

    command.ExecuteNonQuery();

    connection.Close();

     

    and an error like that fire when i run :

    System.Data.OleDb.OleDbException: Operation must use an updateable query.
       at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
       at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
       at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
       at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
       at System.Data.OleDb.OleDbCommand.ExecuteNonQuery()

     

    note : i paradox file exist in my local machine and i run this code from windows application

     

    i hope any one replay to me because i need to handle this problem because my work is stoped because of it

     

    thanx

    Tuesday, October 23, 2007 8:41 AM
  • Does your Paradox table have a unique index (primary key)?

     

    Tuesday, October 23, 2007 3:00 PM
  • thanx sooooooooooo much for your help the problem was as you said i didnt provid the table with Primary key

    thanx so much again .

     

     

    Maylo

     

    Monday, November 5, 2007 8:01 AM