DataSource Controls :: Data In Sql Read Is Not Getting Refreshed?
Feb 1, 2011
I am running the code below to read a sql table and populate the values into a list. This works on the first run through, but after the data has been processed, and the process then re runs, if the sql table has been modified externally, the read of the records does not change. I imagine it is being cached somwhere but as I re dim the dData variable, shouldn't it all be dropped and run afresh?
yes i know half post ack occurs but it does occur right?so why doesnt the dropdownlist get refreshed when the timer ticks on?. for alternative i tried manually clicking a button to create postback but still no refresh of connection of th list
as you can see I'm a table adapter but is giving me the following error: i realy dont know what this error means - though i did a simular action using access DB (and it did work), where i had to user the following: using System.Data.OleDb; now because im using SQL DB im using: using System.Data.SqlClient; //sql server
I m uploading a text file. I want to read that text file line by line and I want to save that data into database if there are no errors in that text file. I have 5 different columns in database and I want to take those 5 columns data in the text file and insert into respective columns.
For this, which is the best way to do. Can we read and insert data into respective fields in no time.
select AutoIdx,TxDate,Id,AccountLink,Description,Debit,Credit,(Debit-Credit) as Actual from PostGL where Id='JL' and AccountLink=2
AutoIdx TxDate Id AccountLink Description Debit Credit Actual 3 2010-01-22 JL 2 bcb 0 35.09 -35.09 5 2010-01-28 JL 2 g 3.51 0 3.51
I am trying in view like this
declare @cnt int declare @i int set @budget=20 set @cnt= (select COUNT(*) from PostGL where AccountLink=2 ) set @i=1 WHILE (@i<=@cnt ) BEGIN set @tdebit=??
I am taking count the no of rows having AccountLink=2 I need to read all debit,credit and add all debit into totaldebit,all credit into totalcredit independently from table. then i need to show the totaldiff as Actual. i need ....totaldiff=totaldebit-totalcredit
I have created a page with a gridview in asp.net that displays the records of a database table and allows users to delete checked records by clicking on a delete button. After I delete a record and I try to refresh the page from the browser (I am using mozilla)I get the follow message:
"To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier."
and if I click resend another record is deleted automatically. Even though I am reloading the gridview after the deletion the application executes again the onclick event of the delete button is executed and the gridview things that there is a checkedbox selected so the code executes my delete function again.
Is there any way to get rid of these behavior. I have been trying quit a few things but nothing works for me.
Some say it is not a bug it is default in asp.net. but for me it is a bug in logic. When you say refresh it should be reload the component that you are refreshing. But in asp.net i notice that they recalling all activity and viewstate like event and data that are triggered in the previous postback. My opinion it is a redo not refresh. this is only my observation on the issue dont hate me on this microsoft fan.
I am using two Updatepanels in ASP.NET AJAX and as soon as there is some event in first updatepanel, it will get refreshed at that time I want my second Updatepanel getting refreshed too. How can I do that ?
I wanted to know is it possible to pass "SqlDataSource" data to a variable? if not how can i use datareader to do this?
i couldn't figure out how to pass SqlDataSource to a varialbe so i tried use datareader and i'm stuck in middle of it, also my query only returns one row and one column so i rather not to use array if possible. here is my code:
I'm have two problems that I would appreciate feedback on:1. I added new fields to database, store procedure, and dataContext but the data Context is not showing up when I select the datasource in the Grid control.2. I have dbo access to the database but have read only access. When I add a grid to the app I only have the option to sort, page, select.
I would like to be able to read the first row of a table and then each successive row sequentially individually. So, is there a way to read the first row of a table, whatever the primary key may be, and then read the next sequential row in the table until the last row has been read? I need to be able to do this in order to create a list of column entries in each row for a listbox control that a user can select from.