Page 1 of 1

Can GetDatabaseString() be called more than once?

Posted: Fri Jun 06, 2025 5:19 pm
by swhite
Hi

In the documentation for the GetDatabaseString() etc. functions states the following:
Note: This function can be called only once for each column. Therefore if this value needs to be used more than once, the data has to be stored in a variable, since all subsequent calls will return the wrong value. This is an ODBC limitation.
Does this restriction only apply to ODBC connections? I am using Postgres which I believe is not using ODBC so does this restriction still apply?

Thanks,
Simon

Re: Can GetDatabaseString() be called more than once?

Posted: Fri Jun 06, 2025 8:42 pm
by mk-soft
Already tried it yourself ?

Re: Can GetDatabaseString() be called more than once?

Posted: Fri Jun 06, 2025 9:31 pm
by swhite
Yes I did and it appears to work so I am looking for some official confirmation.

Simon

Re: Can GetDatabaseString() be called more than once?

Posted: Fri Jun 06, 2025 9:44 pm
by Fred
It's ODBC limitation only

Re: Can GetDatabaseString() be called more than once?

Posted: Tue Jun 10, 2025 9:24 pm
by swhite
Thank-you for the confirmation.

Simon

Re: Can GetDatabaseString() be called more than once?

Posted: Sat Jun 14, 2025 3:11 pm
by Thorium
I use Postgres every time i need a DB with PureBasic.
Works very well. Much better than ODBC.

There are a lot of things that work with Postgres which may be not obvious.
For example you can do UPDATE with QueryDatabase (not UpdateDatabase) and use RETURNS to get data about the modified entries. Which is super usefull if there are conditions in the update query and you want to check which condition was met without another query.
Or you simply want to get the primary id, wich you have set to auto increment. Super usefull.