Getting old data using rda

  • Hi there,

     I have developed an application for Windows Mobile using .Net. The application communicates with SQL 2000 to get the tables needed. Before pulling the tables -using the rda object- i use the rda.submitsql command to invoke a stored procedure (SP) in Sql2000 so as to load the tables for my MobilePC. After the communication procedure finishes i drop the rda object and i close the connection to the PDA's database and recreate it.

    So, in Sql2000 i have Table A that is loaded by invoking my SP. Before running the sp the A table contains lets say 10 records and after running the SP table A contain 15 records. After invoking the SP i drop the corresponding table A on my Mobile PC database and I use rda.pull method to get the JUST updated table A from SQL2000.

    Now my problem is that i get the old version of table A that contains 10 records instead of 15 . Any ideas how this thing is happening and how can i overcome it?

    Dimitris

  • I would trace the SQL server with profiler.  That way you can see the exact SQL statements that are running on that server.

    I would carefully inspect the tables that are acted upon to make sure that you are accessing the correct ones.

    It's usually fairly simple.  If you have a table with 10 rows, then drop/create and insert 15 rows, and select the data from that table, you will get 15 rows, not 10.  So I'm thinking that you are not selecting data from the table that has 15 rows.

     

  • Dear Jeff,

      Thanks for your reply but as simple as it may sound this problem IS happening and, believe me, I DO select the data from the correct table(s). The faniest thing is that when I soft reset the PDA the correct data are pulled until this problem reappears!!! That makes me suspect that "data cashing" somewhere occurs that I am not aware of.

     Do you think this could be a possibility?

  • Anything is possible, I suppose.   I would still check things along the way from point A to point B.  The easiest place to look is on the SQL server, so I suggested starting there.

    Now, since you've confirmed that the problem is not in SQL server, you must move on to the harder part of the puzzle.  I think that you need to confirm that all of the steps are happening correctly on the mobile end.

    Check to make sure that the table is dropped and created.  Then select the rows from that table to be sure it is empty.  Then execute the pull command and re-check.  If everything checks out, you may want to check the network transport and watch the data come across there.

    I really don't know of any caching that would occur with RDA. 

    jg

     

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply