By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,955 Members | 1,756 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,955 IT Pros & Developers. It's quick & easy.

Urgent : Data grid not refreshing properly

100+
P: 284
i make a form whic has one data grid and one text box and one button
when i write a name on tex box and click add the name stored in database successfully.
now in the grid i want to show all the names but after i add no name is seen on datagrid but if i add second time the first name appear on the datagrid and when i entery third entry the second name apperar

i use the following code

Expand|Select|Wrap|Line Numbers
  1. adodc1.recordset.requery
why it show one field alway less than in database

i also try to make a connection with the coding by this
Expand|Select|Wrap|Line Numbers
  1.  dim rs as recordset 
  2. rs.open "select name from customer",conn,adopenstatic,adlockoptimestic
  3. set datagrid1.datasource=rs
  4.  
on the load event but it does not show any data on datagrid why

urgent help is need ,
while i am using ms access , before that i use sqlserver and successfully connect datagrid to database but ms access is not working properly
Jan 30 '08 #1
Share this Question
Share on Google+
6 Replies


debasisdas
Expert 5K+
P: 8,127
Try to refresh the recordset.
Jan 30 '08 #2

100+
P: 284
also refreshing will do the same
if i click the button to add the record add but it only refresh the name
which i add previous and the current record does not showns until
i add another

is there any similar thing like datagrid i find flexgrid by did not properly
code it what is the coding to attached a recorset to flexgrid
when i do it like datagrid it give me error


Try to refresh the recordset.
Jan 30 '08 #3

daniel aristidou
100+
P: 491
[quote=muddasirmunir]their is no option like this
Expand|Select|Wrap|Line Numbers
  1. adodc1.recordset.refresh
Try
Expand|Select|Wrap|Line Numbers
  1. adodc1.refresh
Jan 30 '08 #4

100+
P: 284
i got it by closing recordset and then reopening
Jan 30 '08 #5

P: 68
i got it by closing recordset and then reopening
u can Try by this:
Adodc1.RecordSource = "select * from Info Where ID<" & CInt(Text1.Text) & ";"
Adodc1.Refresh

Get better.

Regards,
shuvo2k6
Jan 31 '08 #6

100+
P: 284
actually refreshing and requring is not working properly
so i close the recordset and then again open it by diong this my problem solved.



u can Try by this:
Adodc1.RecordSource = "select * from Info Where ID<" & CInt(Text1.Text) & ";"
Adodc1.Refresh

Get better.

Regards,
shuvo2k6
Jan 31 '08 #7

Post your reply

Sign in to post your reply or Sign up for a free account.