Hi!
I'm writing a somewhat basic SQL application. I use two local tables that
are equi-joined by their INTEGER primary keyed fields, that I determine in
my application. So here's the deal:
I have a form that the user needs to fill. Once he clicks on OK the program
checks if everything's ok, and if it's so then it inserts the data into the
table by using the INSERT INTO datas VALUES ("12","blabla","tralala")
command. When I do this I get an ENoResultSet saying that the BDE can't find
the cursor handle. Anyway, the data does get inserted, so I bypassed this
exception with "try" and the user doesn't see anything's wrong. Anyway, how
can I make this message not appear at all? The Help said I should add a
SELECT statement to the SQL command, but I don't see how.
Part 2: Even after inserting the data, some of it might go missing. For
example I inserted 6 lines and after Delphi crashed saying there isn't
enough memory 5 lines got lost, and I have no clue why the 6th didn't. I
remember seeing some SQL command in the InterBase SQL editor, something
which sounded like "save changes", but since my current Delphi 5 doesn't
have InterBase I can't find out which command it was.
Finally, the weirdest thing: I inserted the 13th data, after which I closed
my application. Then I restarted it, tried to insert something else, and got
an exception saying that I'm trying to insert a value into the primary key
field which is already inserted. In other words, field with the value 13
already exists. I check the table but there isn't any 13th field. Then I
open the table with Database Desktop and see that THERE IS a 13th field.
I thought it was some BDE error so I restarted the computer, but after I
started my program again, again there was no field 13, and again in DBD
there was. I tried Query1.Refresh, but it didn't help.
So what should I do?
Btw. I'm using Paradox7 tables, with Delphi 5, on Windows ME.
Gajo Csaba
_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi