Problem in updating datas in database without exiting application.

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jun 2007
Posts: 29
Reputation: shahriar2403 is an unknown quantity at this point 
Solved Threads: 0
shahriar2403 shahriar2403 is offline Offline
Light Poster

Problem in updating datas in database without exiting application.

 
0
  #1
Nov 6th, 2007
I use
dim mydb as recordset
and also use
mydb.update
in certain required places like the update command button clicking. It works, by adding the new value in database. I have a list that shows the values of that db. But the main problem is i cannot see the newly added values unless i exit and reopen the application. after reopen i can see the newly added value. But i want to see the value in run time after clicking the add button which add value from a text box that i write. Sorry for the long literature, please help me.
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 569
Reputation: ryan_vietnow is an unknown quantity at this point 
Solved Threads: 71
ryan_vietnow's Avatar
ryan_vietnow ryan_vietnow is offline Offline
Posting Pro

Re: Problem in updating datas in database without exiting application.

 
0
  #2
Nov 6th, 2007
try list1.refresh after the updating part,

but sometimes this does not work.
Best way,after updating,close the connection then open it again,ok?
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 103
Reputation: SCBWV is an unknown quantity at this point 
Solved Threads: 15
SCBWV SCBWV is offline Offline
Junior Poster

Re: Problem in updating datas in database without exiting application.

 
0
  #3
Nov 6th, 2007
Try mydb.requery as well
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 29
Reputation: shahriar2403 is an unknown quantity at this point 
Solved Threads: 0
shahriar2403 shahriar2403 is offline Offline
Light Poster

Re: Problem in updating datas in database without exiting application.

 
0
  #4
Nov 6th, 2007
As i am not so expert, would u please tell me what should be the code example of closing connection?
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 569
Reputation: ryan_vietnow is an unknown quantity at this point 
Solved Threads: 71
ryan_vietnow's Avatar
ryan_vietnow ryan_vietnow is offline Offline
Posting Pro

Re: Problem in updating datas in database without exiting application.

 
0
  #5
Nov 7th, 2007
mydb.close
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 2,103
Reputation: debasisdas will become famous soon enough debasisdas will become famous soon enough 
Solved Threads: 128
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Postaholic

Re: Problem in updating datas in database without exiting application.

 
0
  #6
Nov 7th, 2007
What is the type of connection that you are using.
Share your Knowledge.
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 537
Reputation: choudhuryshouvi is an unknown quantity at this point 
Solved Threads: 49
choudhuryshouvi's Avatar
choudhuryshouvi choudhuryshouvi is offline Offline
Posting Pro

Re: Problem in updating datas in database without exiting application.

 
0
  #7
Nov 7th, 2007
if u r using the DAO technique use the table recordset type at the time of opening the recordset. a sample is :-

dim db as database,rs as recordset

set db=opendatabase(app.path & "\mydb.mdb")
set rs=db.openrecordset("table1",dbopentable)
if rs.recordcount>0 then
''ur data showing code goes here
endif

otherwise u have to simultaneously unload and show up ur forms.
Shouvik_The_Expert_Coder
Have a problem? Don't worry just give me a call and I'll fix it for you.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC