CFRONT and SQL Server

c.kestasc.kestas Member Posts: 15
I have developed a little program in C/Front (using standard C) which keeps looking for new records in a specific table. The program perfectly well when connected to a Navision database. With a SQL database however it misses new records. Here's my code:
for (;;) {
	DBL_SelectLatestVersion();
                DBL_OpenTable(&MessageQueueTable,50015);

	CheckMessageQueueTable(MessageQueueTable);

                DBL_CloseTable(MessageQueueTable);
	Sleep(500);
   };
The first time it goes into the loop it processes all new records correctly, but if a new record is added while the program is running, that record is not "seen" by the program.

Comments

  • c.kestasc.kestas Member Posts: 15
    Further to my original post:

    a. The second sentence should read "The program WORKS prerfectly well ...."

    b. The fundamental issue here is concurrency. If the backend database is Native, then the moment a record is written to a table (and commited) it is picked up by C/Front. This is not the case when the Backend database is SQL. The only way I can read the new records is by disconnecting from the server and connecting again.
Sign In or Register to comment.