Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2023-12

Dbnavigator won't post to MSACESS db

6 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Larry Dalton
 I am using lazarus v2.2.6 on Windows 11.
The form uses the following components:
  MBCCGator: TDBNavigator;
   MBCCGrid: TDBGrid;
   MBCCSource: TDataSource;
   MBCC_Connector: TODBCConnection;
   MBCCQuery: TSQLQuery;
   MBCC_Trans: TSQLTransaction;    MBCCQuery: TSQLQuery;
   also includes several TDBEdits.

It connects to an MSAccess Database, with a table named MBCC_2023. I have no trouble accessing the database, and reading the records. I can use MBCCGator to navigate the database. However, it will NOT post a new record or a changed record to the table. I don't get any error codes. It just won't store. Help is requested.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20231208/2661f958/attachment.htm>

Reply by email

Michael Van Canneyt
to Larry Dalton
Larry Dalton wrote 15 lines
I am using lazarus v2.2.6 on Windows 11. The form uses the following components: MBCCGator: TDBNavigator; MBCCGrid: TDBGrid; MBCCSource: TDataSource; MBCC_Connector: TODBCConnection; MBCCQuery: TSQLQuery; MBCC_Trans: TSQLTransaction; MBCCQuery: TSQLQuery; also includes several TDBEdits. It connects to an MSAccess Database, with a table named MBCC_2023. I have no trouble accessing the database, and reading the records. I can use MBCCGator to navigate the database. However, it will NOT post a new record or a changed record to the table. I don't get any error codes. It just won't store. Help is requested.

Are you calling applyupdates and committing the transaction ?

Michael.

Reply by email

Larry Dalton
to Michael Van Canneyt

In my written code, yes. And I have no problems writing to the table that way. But using the Dbnavigator post button won?t work. Sent from my iPhone

Show quoted text 30 lines
On Dec 10, 2023, at 03:29, Michael Van Canneyt via lazarus wrote: ? > On Fri, 8 Dec 2023, Larry Dalton via lazarus wrote: > > I am using lazarus v2.2.6 on Windows 11. > The form uses the following components: > MBCCGator: TDBNavigator; > MBCCGrid: TDBGrid; > MBCCSource: TDataSource; > MBCC_Connector: TODBCConnection; > MBCCQuery: TSQLQuery; > MBCC_Trans: TSQLTransaction; MBCCQuery: TSQLQuery; > also includes several TDBEdits. > > It connects to an MSAccess Database, with a table named MBCC_2023. > I have no trouble accessing the database, and reading the records. I can > use MBCCGator to navigate the database. However, it will NOT post a new > record or a changed record to the table. I don't get any error codes. It > just won't store. Help is requested. Are you calling applyupdates and committing the transaction ? Michael. -- _______________________________________________ lazarus mailing list https://lists.lazarus-ide.org/listinfo/lazarus

Reply by email

Michael Van Canneyt
to Larry Dalton
Larry Dalton wrote
In my written code, yes. And I have no problems writing to the table that way. But using the Dbnavigator post button won?t work.

Then I suspect that is your problem.
The Dbnavigator post button only does a post, never ApplyUpdates and transaction commit.

The ApplyUpdates can be automated with the sqoAutoApplyUpdates option of the TSQLQuery, but the transaction commit should be implemented for example in the AfterApplyUpdates event.

Michael.

Show quoted text 37 lines
Sent from my iPhone > On Dec 10, 2023, at 03:29, Michael Van Canneyt via lazarus wrote: > > ? > >> On Fri, 8 Dec 2023, Larry Dalton via lazarus wrote: >> >> I am using lazarus v2.2.6 on Windows 11. >> The form uses the following components: >> MBCCGator: TDBNavigator; >> MBCCGrid: TDBGrid; >> MBCCSource: TDataSource; >> MBCC_Connector: TODBCConnection; >> MBCCQuery: TSQLQuery; >> MBCC_Trans: TSQLTransaction; MBCCQuery: TSQLQuery; >> also includes several TDBEdits. >> >> It connects to an MSAccess Database, with a table named MBCC_2023. >> I have no trouble accessing the database, and reading the records. I can >> use MBCCGator to navigate the database. However, it will NOT post a new >> record or a changed record to the table. I don't get any error codes. It >> just won't store. Help is requested. > > Are you calling applyupdates and committing the transaction ? > > Michael. > -- > _______________________________________________ > lazarus mailing list > > https://lists.lazarus-ide.org/listinfo/lazarus -- _______________________________________________ lazarus mailing list https://lists.lazarus-ide.org/listinfo/lazarus

Reply by email

Larry Dalton
to Larry Dalton: In my written code, yes. And I have no problems writing to the table that way. But using…

Yes
Sent from my iPhone

Show quoted text 35 lines
On Dec 10, 2023, at 09:42, Larry Dalton wrote: ?In my written code, yes. And I have no problems writing to the table that way. But using the Dbnavigator post button won?t work. Sent from my iPhone > On Dec 10, 2023, at 03:29, Michael Van Canneyt via lazarus wrote: > > ? > >>> On Fri, 8 Dec 2023, Larry Dalton via lazarus wrote: >> >> I am using lazarus v2.2.6 on Windows 11. >> The form uses the following components: >> MBCCGator: TDBNavigator; >> MBCCGrid: TDBGrid; >> MBCCSource: TDataSource; >> MBCC_Connector: TODBCConnection; >> MBCCQuery: TSQLQuery; >> MBCC_Trans: TSQLTransaction; MBCCQuery: TSQLQuery; >> also includes several TDBEdits. >> >> It connects to an MSAccess Database, with a table named MBCC_2023. >> I have no trouble accessing the database, and reading the records. I can >> use MBCCGator to navigate the database. However, it will NOT post a new >> record or a changed record to the table. I don't get any error codes. It >> just won't store. Help is requested. > > Are you calling applyupdates and committing the transaction ? > > Michael. > -- > _______________________________________________ > lazarus mailing list > > https://lists.lazarus-ide.org/listinfo/lazarus

Reply by email

LacaK
to Michael Van Canneyt: Then I suspect that is your problem. The Dbnavigator post button only does a post, never…
Show quoted text 15 lines
> In my written code, yes. And I have no problems writing to the table > that way. But using the Dbnavigator post button won?t work. Then I suspect that is your problem. The Dbnavigator post button only does a post, never ApplyUpdates and transaction commit. The ApplyUpdates can be automated with the sqoAutoApplyUpdates option of the TSQLQuery, but the transaction commit should be implemented for example in the AfterApplyUpdates event.

There is also sqoAutoCommit ...
L.

Show quoted text 45 lines
Michael. > Sent from my iPhone > >> On Dec 10, 2023, at 03:29, Michael Van Canneyt via lazarus >> wrote: >> >> ? >> >>> On Fri, 8 Dec 2023, Larry Dalton via lazarus wrote: >>> >>> I am using lazarus v2.2.6 on Windows 11. >>> The form uses the following components: >>> MBCCGator: TDBNavigator; >>> ?MBCCGrid: TDBGrid; >>> ?MBCCSource: TDataSource; >>> ?MBCC_Connector: TODBCConnection; >>> ?MBCCQuery: TSQLQuery; >>> ?MBCC_Trans: TSQLTransaction;??? MBCCQuery: TSQLQuery; >>> ?also includes several TDBEdits. >>> >>> ?It connects to an MSAccess Database, with a table named MBCC_2023. >>> I have no trouble accessing the database, and reading the records. >>> I can >>> use MBCCGator to navigate the database. However, it will NOT post a >>> new >>> record or a changed record to the? table. I don't get any error >>> codes. It >>> just won't? store. Help is requested. >> >> Are you calling applyupdates and committing the transaction ? >> >> Michael. >> -- >> _______________________________________________ >> lazarus mailing list >> >> https://lists.lazarus-ide.org/listinfo/lazarus > -- > _______________________________________________ > lazarus mailing list > > https://lists.lazarus-ide.org/listinfo/lazarus

Reply by email