[Lazarus] Fwd: Re: Trouble with PostGres access
Alex du Plessis
alexdup01 at telkomsa.net
Wed Mar 25 11:15:07 CET 2009
ArĂ Ricardo Ody wrote:
> At 13:40 21/3/2009, you wrote:
>
>> Try copying all the dll's in the postgres bin directory to
>> C:\WINDOWS\system32
>> I have just created a test app with only TPQConnection filled in server
>> name, database name, user and password and it connected without any
>> hiccup.
>>
>> The messages you get are typically when Lazarus(and your app) can't see
>> the dll's.
>>
>
> I done. And it seems to solve the trouble. Thank you. At least, when
> I change the connected property to true, no errors occur.
>
>
>
>> I also noticed that you are not running the postgres server locally
>> (i.e. localhost - 127.0.0.1). Have you edited postgres.conf on the
>> server to allow connections from machines other than localhost? Stated
>> differently: Have you told the postgres server to allow connections from
>> network machines?
>>
>
> If I open the postgres databases with pgAdmin that runs in my
> machine, I suppose that the connections from the netword machines is
> allowed. Doesn't it?
>
That would seem so yes.
> pgAdmin show that my table is in the schema "public" and in a
> database named "Conversor". If the table I want to access is named
> DATATYPES how should I write the sql command to acess the table in a
> full browse?
>
> select * from Conversor.DATATYPES?
> select * from public.DATATYPES?
>
If you have set TPQConnection to connect to the database "Conversor",
you don't need to qualify the tablename with the schema name(although
that is allowed) because schema "public" is the default schema. When
you create other schemas though and want to access the tables in the new
schema then you do have to qualify the tablename with the schema name as
you have done above.
> Or how?
>
> Thanks for your efforts and patience.
>
My pleasure
> Ricardo
>
>
>
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>
More information about the Lazarus
mailing list