Paradox 4 database connect and edit inside c#

mion shion 241 Reputation points
2022-02-04T10:14:44.373+00:00

Hello, all i have been searching for weeks on how to connect and edit and change paradox files inside c#,

what i am trying to do is connect ( have done this, ) and display data on my form via datagrid and text boxes, i have looked for countless hours for delphi tutorials on bde and delphi 7 but only ones i can find are not in english and does not go in depth so have tryied to do this in c#

i done the following code by browsing around and have got to work.

           var connectionString = "Driver={Microsoft Paradox Driver (*.db )};"
                            + "DriverID=538;Fil=Paradox 5.X;"
                            + "DefaultDir=C:\\Retcon\\Shifts\\;"
                            + "Dbq=C:\\Retcon\\Shifts\\;"
                            + "CollatingSequence=ASCII;";

            var connection = new OdbcConnection(connectionString);
            var command = new OdbcCommand("SELECT * FROM shead", connection);

            connection.Open();
            using (var reader = command.ExecuteReader())
                if (reader.HasRows)
                    while (reader.Read())
                        listBox1.Items.Add(reader.GetString(5));

but unsure how to parse each row and from the database and put it into Datagrid and be able to edit and save it as its not like a normal database

also if anyone has or knows of online corces on bde and delphi 7 or a good tutorial that is around in english please do post as i have searched all over for it

Thank you in advance

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,874 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.