Last post Sep 27, 2017 12:42 PM by jzero
Sep 22, 2017 01:15 PM|STadLA|LINK
<div class="post-text" itemprop="text">
My web application is created using asp.net 4.0, with sql server 2008 r2 express. I am using telerik grid control to display data. Suddenly i observe that, i am able to create records, i checked from back end, but these newly created records are not getting
fetched from DB. Existing records are getting displayed in the telerik grid. Following are the details in which this application is setup, OS is Windows 10 x64 pro, Sql Server Express 2008 R2, IIS 10.
There are around 30 DBs existing in this laptop. Issue is happening when i connect the application to any of these DBs.
Note: same application and database setup in a different laptop is working fine.
Sep 25, 2017 07:43 AM|Eric Du|LINK
According to your description, I think this issue is related to the cache of the browser. Please try clear the cache of the browser, when you open this page in the browser, then press CTRL + F5 to refresh page(Clear Cache).
Sep 25, 2017 09:32 AM|STadLA|LINK
Hi Eric Du,
Thanks for the update,
Yes, i did try clearing Cache on browser, i tried using IE, Firefox, Chrome. I even tried clearing IIS and SQL cache. But no luck.
There are also multiple databases on this laptop. May be it will give any clue.
Sep 25, 2017 11:53 AM|Eric Du|LINK
About this situation, I think you could debug code in your side(Local), you need check if insert the new data into the database, then check if the data from the database is same as shown in the page!
Sep 26, 2017 09:48 AM|STadLA|LINK
I did check, the data is same. the values which i provide are getting saved in DB, but unable to get these newly created records into listing page(grid view).
Sep 26, 2017 11:24 AM|PatriceSc|LINK
I assume you have a selection criteria to select which rows are shown ? You double check this criteria? For example if this is a date selection but that you are storing now a datetime as well it is expected that nothing will match the current date.
Sep 27, 2017 05:51 AM|STadLA|LINK
I am using Select * to show all records from this table, there is no condition.
Sep 27, 2017 11:12 AM|Eric Du|LINK
Please check if the connection string of 'insert' is same as 'select' one? I hope you could post your code and data for us to test!
Sep 27, 2017 12:01 PM|PatriceSc|LINK
And you don't use paging ? You meant no WHERE clause at all ? This is not a view with its own underlying filter ?
If you are really showing all rows I don't see many options:
- they are not inserted in this database
- they are inserted but later deleted
"i am able to create records" might mean rather that you don't see any error but that you do have an error that prevent to add them properly to the db. Make sure you don't have an Ajax error (use F12 Network in your browser for example) or an hidden exception.
First make 100% sure if the data is inserted in the db. In short do you see the same number of rows when showing your data with the GridView and using a SELECT * FROM YourTable query in SQL Server Management Studio ? Triple check you are using the same db
in both cases.
Sep 27, 2017 12:42 PM|jzero|LINK
In addition to Eric Du comment about "connection string", check if you have more than 1, and each pointing to a distinct database file.
Had a similar issue in past, by my mistake, was created a second connection string pointing to SQL Server instead of SQL Express