Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
Lance is currently offline  Lance
Messages: 526
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.
 
Read Message
Read Message
Read Message
Previous Topic: SqlArray with an Option
Next Topic: sqlite and dropdate / editdate etc
Goto Forum:
  


Current Time: Thu Apr 18 05:34:48 CEST 2024

Total time taken to generate the page: 0.00531 seconds