 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Paolo Borlandi Guest
|
Posted: Wed Oct 13, 2004 3:12 pm Post subject: Help on database refresh |
|
|
Hi All
I'm writing an application that reads data from an mdb access database from
a CDrom. I'm using ODBC and not ADO because of broblems encountered by
customers with the appropriate upgrade of their system. So I use a normal
database and a normal session with normal dataset and queries. The db has
also a password. My app the first time doesn't open the database on the cd.
It is the user that by clicking the "load data" button opens it on the CDrom
he has inserted, and all is right. At this point the user may change the
CDrom to read others data. (the mdb file has always the same name: cd.mdb on
all CDroms). To do this he can click the "load data" button after having
inserted a new CDrom. But the data red are the exactly the same of before.
WHYYYY??? How can I refresh the database to read the new data?
Here is the code I use to close the old db and open the new one:
.........
.........
q2->Close();
q1->Close();
t1->Close();
Session1->Close();
dbase1->Close();
Session1->Open();
tLogin->Enabled = true;
dbase1->Open();
// Creazione Colonne Griglia
q1->SQL->Clear();
q1->SQL->Add("select * from CAMPIVIS");
q1->Open();
.........
.........
THANK YOU VERY MUCH!!!!!
Paolo from Italy
|
|
| Back to top |
|
 |
Viatcheslav V. Vassiliev Guest
|
Posted: Fri Oct 15, 2004 9:51 am Post subject: Re: Help on database refresh |
|
|
I am not good with BDE, but try to place Session1->Open() after
dbase1->Open().
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Paolo Borlandi" <pborlandi (AT) virgilio (DOT) it> сообщил/сообщила в новостях
следующее: news:416e8097 (AT) newsgroups (DOT) borland.com...
| Quote: | Hi All
I'm writing an application that reads data from an mdb access database
from
a CDrom. I'm using ODBC and not ADO because of broblems encountered by
customers with the appropriate upgrade of their system. So I use a normal
database and a normal session with normal dataset and queries. The db has
also a password. My app the first time doesn't open the database on the
cd.
It is the user that by clicking the "load data" button opens it on the
CDrom
he has inserted, and all is right. At this point the user may change the
CDrom to read others data. (the mdb file has always the same name: cd.mdb
on
all CDroms). To do this he can click the "load data" button after having
inserted a new CDrom. But the data red are the exactly the same of before.
WHYYYY??? How can I refresh the database to read the new data?
Here is the code I use to close the old db and open the new one:
........
........
q2->Close();
q1->Close();
t1->Close();
Session1->Close();
dbase1->Close();
Session1->Open();
tLogin->Enabled = true;
dbase1->Open();
// Creazione Colonne Griglia
q1->SQL->Clear();
q1->SQL->Add("select * from CAMPIVIS");
q1->Open();
........
........
THANK YOU VERY MUCH!!!!!
Paolo from Italy
|
|
|
| Back to top |
|
 |
Jayme Jeffman Filho Guest
|
Posted: Fri Oct 15, 2004 2:20 pm Post subject: Re: Help on database refresh |
|
|
I'm afraid it won't work out, because the Session1 owns the dbase1,
so it should be open before any data set, and it will automatically open
when any of its data sets open.
Jayme.
"Viatcheslav V. Vassiliev" <support (AT) oledbdirect (DOT) com> escreveu na mensagem
news:416f9db5 (AT) newsgroups (DOT) borland.com...
| Quote: | I am not good with BDE, but try to place Session1->Open() after
dbase1->Open().
file://------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Paolo Borlandi" <pborlandi (AT) virgilio (DOT) it> сообщил/сообщила в новостях
следующее: news:416e8097 (AT) newsgroups (DOT) borland.com...
Hi All
I'm writing an application that reads data from an mdb access database
from
a CDrom. I'm using ODBC and not ADO because of broblems encountered by
customers with the appropriate upgrade of their system. So I use a
normal
database and a normal session with normal dataset and queries. The db
has
also a password. My app the first time doesn't open the database on the
cd.
It is the user that by clicking the "load data" button opens it on the
CDrom
he has inserted, and all is right. At this point the user may change the
CDrom to read others data. (the mdb file has always the same name:
cd.mdb
on
all CDroms). To do this he can click the "load data" button after having
inserted a new CDrom. But the data red are the exactly the same of
before.
WHYYYY??? How can I refresh the database to read the new data?
Here is the code I use to close the old db and open the new one:
........
........
q2->Close();
q1->Close();
t1->Close();
Session1->Close();
dbase1->Close();
Session1->Open();
tLogin->Enabled = true;
dbase1->Open();
// Creazione Colonne Griglia
q1->SQL->Clear();
q1->SQL->Add("select * from CAMPIVIS");
q1->Open();
........
........
THANK YOU VERY MUCH!!!!!
Paolo from Italy
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|