Board index » delphi » EOleException while inserting a new row using ADO Table

EOleException while inserting a new row using ADO Table

Im trying to do what i think is a really simple task. I want to inert a new
row of data into a SQL Server 2000 Table going through an ADO Table. I have
applied the Delphi 5 patch and the ADOExpress Patch. The code im using is:
    with adminDataModule.userstable do
    begin
        Insert;        // insert record into master table
        FieldByName( 'USER_FIRST_NAME' ).AsString := string(txtF.text);
        FieldByName( 'USER_LAST_NAME' ).AsString := string(txtL.text);
        Post;
        Requery;
    end;
When it tries to post i get an EOleException: Unknown error occurred. Im new
to delphi so i dont know if i have all my connection and table properties
set correctly. Side note i can update a row of data...
thanks for your help

--matt

 

Re:EOleException while inserting a new row using ADO Table


Quote
>When it tries to post i get an EOleException: Unknown error occurred. Im new
>to delphi so i dont know if i have all my connection and table properties
>set correctly.

Do you have any lookup fields?   If so try setting the LookupCache to True

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads