Home » U++ Library support » U++ SQL » How does All_Tables determine if a table exists? (It doesn't work once the database is dropped and recreated.)
How does All_Tables determine if a table exists? [message #54609] |
Wed, 19 August 2020 18:55  |
Lance
Messages: 656 Registered: March 2007
|
Contributor |
|
|
I encountered this problem in PostgreSQL, but it likely is not limited to PG.
To reproduce the problem(you need a PostgreSQL server):
1. Open the SQL_PostgreSql example in the reference assembly. Modify the connection string to a valid one in Postgres.cpp
!m_session.Open("host=localhost dbname=test user=test password=yourpassword")
2. F5 to run the program.
3. Drop the test database (eg., in pgAdmin4) and recreate it either with the same name of change to a new name, eg, test1
4. modify the connection string like you did in step 1, with the name you changed to in step 3.
5. F5, the program will fail. As All_Tables(sch) now doesn't do anything as somehow it thinks all tables exsit.
|
|
|
Goto Forum:
Current Time: Sat May 10 14:26:53 CEST 2025
Total time taken to generate the page: 0.00957 seconds
|