|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Database Question
I have Access database with table called Allprojects. I am trying to delete a project from database (from table Allprojects) and after deleting a project I display all projects from table "Allprojects" in a tree. My problem is after I delete the project and load all the remaining project in tree,"the deleted project" shows up in a tree ( ERROR !!! This should not happen since project has been deleted from database.) and if I delete it again (without exiting the application) and again load all projects in tree I dont see the "deleted project" (Which is correct)
I am using following code: dim con_3 as new connection sql as string dim pid as integer pid=1 con_3.open "Provider=Microsoft.Jet.OLEDB.4.0;datasource=" & srcdatabase & ";persist Security Info=false" sql "delete * from Allproject where projectid=" & pid & " " con3.BeginTrans. con_3.Execute sql con_3.CommitTrans 'here I have code for displaying remaining projects in a tree My question is why do i see deleted project in a tree after i delete it the first time and second time it works the way it supposed to and how do I correct it? Thanks for the help!!! |
|
#2
|
|||
|
|||
|
Just guessing, maybe something is being cached until you close your database connection?
|
|
#3
|
|||
|
|||
|
Quote:
How do I solve the problem? |
|
#4
|
|||
|
|||
|
What have you tried? You may need to refresh the tree control after you change the db, or the db data may be cached somewhere. You'll have to try to isolate the problem.
|
|
#5
|
|||
|
|||
|
Using other db control...Maybe it is difficult...
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Database Question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|