This is my fist encounter with PostGreSQL
I have created the tables and columns. Everything looks sweet in pgAdmin.
Connection works. However, when I try to access a table, I have inconsistent results.
Dim sql As String = “SELECT max(rowid) from " + s // (s = tablename)
If the tablename is summary, this works
For all other tables, the error mesg is " relation “tablename” does not exist”
i need to put add " to the tablename and it works
If I do the same with summary, the sql throws the same error as for the other tables without "
If you quote the table names postgres will honor your capitalization.
So if your tablename is Customer you need to say: Select * from “Customer” .
If otoh your tablename is customer than saying Select * from Customer also works, because the PG parser converts this to:
Select * from customer
Usually it is a good idea to not use any capital letters in table names.
[quote=258529:@Maximilian Tyrtania]If you quote the table names postgres will honor your capitalization.
So if your tablename is Customer you need to say: Select * from “Customer” .
If otoh your tablename is customer than saying Select * from Customer also works, because the PG parser converts this to:
Select * from customer
Usually it is a good idea to not use any capital letters in table names.[/quote]
fields too.