User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 361,867 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,470 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser:
Views: 498 | Replies: 6
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: 469
Reputation: ryan_vietnow is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 60
ryan_vietnow's Avatar
ryan_vietnow ryan_vietnow is offline Offline
Posting Pro in Training

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: 69
Reputation: SCBWV is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 9
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: 469
Reputation: ryan_vietnow is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 60
ryan_vietnow's Avatar
ryan_vietnow ryan_vietnow is offline Offline
Posting Pro in Training

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,128
Reputation: debasisdas is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 66
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Veteran Poster

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: 493
Reputation: choudhuryshouvi is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 45
choudhuryshouvi's Avatar
choudhuryshouvi choudhuryshouvi is offline Offline
Posting Pro in Training

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)

 

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 6:24 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC