?
Solved

IB6 MetaData Change

Posted on 2003-03-30
6
Medium Priority
?
188 Views
Last Modified: 2010-04-04
Hi,

After creating or droping a view (with a TIBQuery) the new view is not recognized by other IBDataBases and IBConsole. How can I notify them about the metadata changes? (Even after  TIBDatabase.FlushSchema and reopening the DataBase it could not see any change.)

Any idea?

Regards, Laci


0
Comment
Question by:Laci030999
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 9

Expert Comment

by:tkalchev
ID: 8237589
Then how are you sure that the execution of the TIBQuery is successful ? Are you really sure that you have created/dropped the view ?
0
 
LVL 9

Accepted Solution

by:
tkalchev earned 2000 total points
ID: 8237595
Sounds like not commited transaction ...
0
 

Author Comment

by:Laci030999
ID: 8237657
1. When trying to Execute the same query again it raises an Exception, that the view exists.

2. After droping a view with the IBQuery which is visible to IBConsole, It stays visible in IBConsole but when I try to drop the same view from there, I receive an Exception, that the view does not exists.

3.After shoting down the IB server, and starting again , the changes becomes visible to IBConsole as well. The only way I've found to notify IBConsole about the changes was to do this. :(


I forgot to mention, that curently I'm using public licence version of IB 6.01.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Expert Comment

by:tkalchev
ID: 8237680
Are you able to see the newly created view in IBConsole after closing your program without shutting down the server ?
0
 
LVL 9

Expert Comment

by:tkalchev
ID: 8237713
Also just noticed you are using IBQuery for creating/dropping view. As I believe, IBQuery is more useful for sql commands, which return some data :

--Delphi Help--
Use TIBQuery to access one or more tables in a database using SQL statements. The TIBQuery component provides a read-only dataset, and adapts well to the InterBase client/server environment.


Maybe is a good solution to use IBSQL instead. And to make sure that the transaction is commited :


  IBSQL1.SQL.Text := 'drop view VIEW1';
  try
    IBSQL1.ExecQuery;
    IBSQL1.Transaction.Commit;
  except
    IBSQL1.Transaction.Rollback;
    ShowMessage ( 'Error' );
  end;


 
0
 

Author Comment

by:Laci030999
ID: 8237772
U R right. It was simply not committed. ;-)

I'm new to SQL. This far I've been using IBconsole which does not require commiting SQLs which change the MetaData. For some reason I thought it should be the same when using IBQuery. :))

It is working now!!

Thank You for your help,
Laci
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses
Course of the Month14 days, 14 hours left to enroll

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question