BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help on database refresh

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Paolo Borlandi
Guest





PostPosted: Wed Oct 13, 2004 3:12 pm    Post subject: Help on database refresh Reply with 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
Viatcheslav V. Vassiliev
Guest





PostPosted: Fri Oct 15, 2004 9:51 am    Post subject: Re: Help on database refresh Reply with quote



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





PostPosted: Fri Oct 15, 2004 2:20 pm    Post subject: Re: Help on database refresh Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.