RSS Forums RSS
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 764 | Replies: 6 | Thread Tools  Display Modes
Reply
Join Date: Jun 2007
Posts: 29
Reputation: shahriar2403 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
shahriar2403 shahriar2403 is offline Offline
Light Poster

Help Problem in updating datas in database without exiting application.

  #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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2007
Location: Cavite,Philippines
Posts: 508
Reputation: ryan_vietnow is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 68
ryan_vietnow's Avatar
ryan_vietnow ryan_vietnow is offline Offline
Posting Pro

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

  #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?
"death is the cure of all diseases..."
http://ryantetek.wordpress.com
Reply With Quote  
Join Date: Apr 2007
Posts: 78
Reputation: SCBWV is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 10
SCBWV SCBWV is offline Offline
Junior Poster in Training

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

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

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

  #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  
Join Date: Aug 2007
Location: Cavite,Philippines
Posts: 508
Reputation: ryan_vietnow is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 68
ryan_vietnow's Avatar
ryan_vietnow ryan_vietnow is offline Offline
Posting Pro

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

  #5  
Nov 7th, 2007
mydb.close
"death is the cure of all diseases..."
http://ryantetek.wordpress.com
Reply With Quote  
Join Date: Feb 2007
Location: Bangalore,India
Posts: 1,502
Reputation: debasisdas is on a distinguished road 
Rep Power: 5
Solved Threads: 91
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Posting Virtuoso

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

  #6  
Nov 7th, 2007
What is the type of connection that you are using.
Share your Knowledge.
Reply With Quote  
Join Date: May 2007
Location: India
Posts: 505
Reputation: choudhuryshouvi is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 48
choudhuryshouvi's Avatar
choudhuryshouvi choudhuryshouvi is offline Offline
Posting Pro

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

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 2:45 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC