Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 5 of 5 total |
Simple INSERT not inserting |
Thu, Feb 18 2010 1:30 AM | Permanent Link |
Phil Read | Hi Tim & Team,
I've got a number of screen all maintaining TABLES using DataSource / Tables, nothing out of the ordinary. All of the screens have an ADD and EDIT button and allow the user to edit or ADD a new record. All very straight forward really. Now one screen when I use the ADD button calls a simple line of code for example: CompanyTable->Insert(); But for some reason a new record is NOT inserted and infact it doesn't even go into an insert mode it just stays on the last record selected in the datagrid. All very strange, so I went through and compared the code with many other screens and it's identical besides the table name. No errors are shown it just doesn't insert. Have you seen anything like this before? I've also upgraded to the latest version and made no difference. Cheers, Phil. |
Thu, Feb 18 2010 9:18 AM | Permanent Link |
"Robert" | "Phil Read" <phil@vizualweb.com> wrote in message news:B50AA486-9517-490E-9FDB-4D6170DACE0B@news.elevatesoft.com... > Hi Tim & Team, > > I've got a number of screen all maintaining TABLES using DataSource / > Tables, nothing out of the ordinary. > All of the screens have an ADD and EDIT button and allow the user to edit > or ADD a new record. All very straight forward really. > > Now one screen when I use the ADD button calls a simple line of code for > example: > > CompanyTable->Insert(); > > But for some reason a new record is NOT inserted and infact it doesn't > even go into an insert mode it just stays on the last record selected in > the datagrid. All very strange, so I went through and compared the code > with many other screens and it's identical besides the table name. No > errors are shown it just doesn't insert. > Maybe it does. Is the grid / datasource pointing to this same table component? Robert |
Thu, Feb 18 2010 11:57 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Phil,
<< But for some reason a new record is NOT inserted and infact it doesn't even go into an insert mode it just stays on the last record selected in the datagrid. All very strange, so I went through and compared the code with many other screens and it's identical besides the table name. No errors are shown it just doesn't insert. >> Check your event handlers for that table and make sure that you aren't causing a re-positioning or refresh for the same table. Doing so will cause the table to leave the dsInsert state and go back to the same record. -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Feb 18 2010 8:24 PM | Permanent Link |
Phil Read | On 19/02/2010 3:57 AM, Tim Young [Elevate Software] wrote:
> Phil, > > << But for some reason a new record is NOT inserted and infact it doesn't > even go into an insert mode it just stays on the last record selected in the > datagrid. All very strange, so I went through and compared the code with > many other screens and it's identical besides the table name. No errors are > shown it just doesn't insert.>> > > Check your event handlers for that table and make sure that you aren't > causing a re-positioning or refresh for the same table. Doing so will cause > the table to leave the dsInsert state and go back to the same record. > Hi, Just checked, there's no Events on either table or source and the dbgrid and dbedits are all using the same datasource, the code to EDIT works but code to INSERT just doesn't do anything. I had more code under the Onclick of the ADD button, but removed it all and just had: CompanyTable->Insert(); But same thing happens. Really weird, even tried repairing the table. Thanks, Phil. |
Fri, Feb 19 2010 4:22 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Phil,
<< Hi, Just checked, there's no Events on either table or source and the dbgrid and dbedits are all using the same datasource, the code to EDIT works but code to INSERT just doesn't do anything. I had more code under the Onclick of the ADD button, but removed it all and just had: CompanyTable->Insert(); But same thing happens. Really weird, even tried repairing the table. >> Did you try creating a sample project that reproduces this ? That usually helps point to the issue. Also, if you want to send me the code that you're using, I can take a look at it and tell you where the problem is. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Friday, April 19, 2024 at 07:09 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |