Hello NickB,
after all it was a programming error (blame on me). I was not aware that i
have to map (DBBeginMap......DBActivateMap) every time ibefore i do a fetch,
i thought i have to do it once at the beginning of my program. So i tried it
as you advised me and, smilehappy, it works.
Thanks a lot, you make my day 🐵 Thanks also to Tim from NI Germany.
Norbert
i'm in contact with the service of NI-Germany. I send them parts of my
project and they could reproduce the error, so its a real bug and not a
pogramming error by myself (smilehappy) thats verified by NI.
Now we are expecting to get help from NI (USA).....
Thanks for the assistance of NI-Germany so far.
"nickb" <x@no.email> schrieb im Newsbeitrag
news:1214439010924-731989@exchange.ni.com...
> Hello Norbert, I have indeed received your code from NI-Germany today, and
> spent a good deal of time going through it. I think the behavior you
> were seeing comes down to two issues. The first is that you were
> calling DBFetchRandom without first calling
> DBAllowFetchAnyDirection. It is certainly understandable to have
> missed this, although if you want, you can find it stated on the function
> panel for DBFetchRandom.Where the real issue lies is in the second point,
> which is how the DBMap calls have been configured. You call
> DBBeginMap, DBMapColumnTo* and DBActivateMap all one time when the program
> is first run. The small problem with this is that DBActivateMap
> actually runs an SQL Select statement on whatever recordset is present in
> the table when the program is first run. It is possible the table is
> empty, or that old data is present there. This maps your variables
> to the old data, and when you run DBFetchRandom, it simply searches this
> old recordset for the index you supplied to DBFetchRandom, either erroring
> if it doesn't exist, or returning old, stale data. The solution for
> this is to move those three functions (DBBeginMap, DBMapColumTo*, and
> DBActivateMap) to your callback function that retrieves the values from
> the table. This was you activate the map on the most recent
> data. Please let me know if you have any questions!NickBNational
> InstrumentsApplications Engineering