Connect to PostgreSQL with kylix3

Поиск
Список
Период
Сортировка
Искать

Connect to PostgreSQL with kylix3

От:
Carlos Ojea Castro <carlosojea@leveltelecom.es>
Дата:

Hello:

In kylix3 I made a SQLConnection component (called 'SQLConnection1') to
connect to a PostgreSQL database. I started the PostgreSQL server so
Object inspector shows 'Connected: True' on that object.

Then I made a SQLDataSet component (called 'SQLDataset1').
On 'SQLDataset1' I set SQLConnection to 'SQLConnection1', CommandType to
'ctQuery' and CommandText to 'SELECT * FROM pc104' (pc104 is a valid
table name).
But now, when I try to make 'SQLDataset1' Active to 'True', I get this
error message:
Access violation at address 43A92782, accessing address 43B09774

¿Any idea?

Thank you.
Regards,
Carlos


Re: Connect to PostgreSQL with kylix3

От:
Carlos Ojea Castro <carlosojea@leveltelecom.es>
Дата:
>
>
>>In kylix3 I made a SQLConnection component (called 'SQLConnection1') to
>>connect to a PostgreSQL database. I started the PostgreSQL server so
>>Object inspector shows 'Connected: True' on that object.
>>
>>Then I made a SQLDataSet component (called 'SQLDataset1').
>>On 'SQLDataset1' I set SQLConnection to 'SQLConnection1', CommandType to
>>'ctQuery' and CommandText to 'SELECT * FROM pc104' (pc104 is a valid
>>table name).
>>But now, when I try to make 'SQLDataset1' Active to 'True', I get this
>>error message:
>>Access violation at address 43A92782, accessing address 43B09774
>>    
>>
>
>What version of postgres?  If 7.4, then you need to use an older libpq
>with kylix.
>  
>
YES, my postgres version is 7.4.1.
What version of libpq I need to use? (And how could I make de change?)
Thank you



Re: Connect to PostgreSQL with kylix3

От:
Carlos Ojea Castro <carlosojea@leveltelecom.es>
Дата:
>
>
>>>>In kylix3 I made a SQLConnection component (called 'SQLConnection1') to
>>>>connect to a PostgreSQL database. I started the PostgreSQL server so
>>>>Object inspector shows 'Connected: True' on that object.
>>>>
>>>>Then I made a SQLDataSet component (called 'SQLDataset1').
>>>>On 'SQLDataset1' I set SQLConnection to 'SQLConnection1', CommandType to
>>>>'ctQuery' and CommandText to 'SELECT * FROM pc104' (pc104 is a valid
>>>>table name).
>>>>But now, when I try to make 'SQLDataset1' Active to 'True', I get this
>>>>error message:
>>>>Access violation at address 43A92782, accessing address 43B09774
>>>>        
>>>>
>>>What version of postgres?  If 7.4, then you need to use an older libpq
>>>with kylix.
>>>      
>>>
>>YES, my postgres version is 7.4.1.
>>What version of libpq I need to use? (And how could I make de change?)
>>Thank you
>>
>
>in /usr/local/pgsql/lib, change the libpq.so symbolic link to point to
>libpq.so.2.2
>
>klint.
>  
>
Thank you, klint.
I made that, but now my SQLConnection component does not connect. When I 
try to

make 'SQLConnection1' Active to 'True' I get this message:
dbExpress Error: Invalid Username/Password

Maybe I need another libpq?

Thanks,
Carlos




Re: Connect to PostgreSQL with kylix3

От:
Carlos Ojea Castro <carlosojea@leveltelecom.es>
Дата:
>
>
>>make 'SQLConnection1' Active to 'True' I get this message:
>>dbExpress Error: Invalid Username/Password
>>
>>Maybe I need another libpq?
>>    
>>
>
>In SQLConnection1.params, do you have
>
>   User_name=xxxx
>   Password=yyyy
>
>where xxxx is a valid postgres username
>and yyyy is the correct password for that user?
>
>klint.
>
Yes, there is a valid username and password and I still get the same 
error when trying to make SQLConnection component active.
Before I made the change of libpq.so link, the SQLConnection component 
was 'Active true' regardless of the values written in 'user_name' and 
'password'.

What do you think?

Thank you very much for your help,
Carlos




Re: Connect to PostgreSQL with kylix3

От:
Carlos Ojea Castro <carlosojea@leveltelecom.es>
Дата:

Finally, I get SQLConnection and SQLDataset both 'Active' !
In /usr/local/pgsql/lib, I changed the libpq.so symbolic link to point 
to libpq.so.2.2
Also I made this simbolic link:
ln -s /tmp/.s.PGSQL.5432 /var/run/postgresql/.s.PGSQL.5432


Connect to a PostgreSQL table with kylix3

От:
Carlos Ojea Castro <carlosojea@leveltelecom.es>
Дата:

Hello:

I made a program to connect to three tables called 'pc104', 'sensores' 
and 'pm500' on a postgresql database.
Everything was fine until I made some changes on table 'pc104' (drop 
table, create the table again, added new values, etc)
Now when I make a SQLQuery object, if I make a query on table 'pc104' or 
on table 'sensores', I get this error when I try to get the SQLQuery 
object active:

Access violation at address 43A92782, accessing address 43B09774

Anyone knows why?

Thank you,
Carlos


Re: Connect to a PostgreSQL table with kylix3

От:
Richard Huxton <dev@archonet.com>
Дата:
Carlos Ojea Castro wrote:
> 
> Hello:
> 
> I made a program to connect to three tables called 'pc104', 'sensores' 
> and 'pm500' on a postgresql database.
> Everything was fine until I made some changes on table 'pc104' (drop 
> table, create the table again, added new values, etc)
> Now when I make a SQLQuery object, if I make a query on table 'pc104' or 
> on table 'sensores', I get this error when I try to get the SQLQuery 
> object active:
> 
> Access violation at address 43A92782, accessing address 43B09774

This looks more like a kylix error than a postgresql one. Could the 
kylix database interface still be trying to access the old version of 
the table? Is there some way to refresh/recreate the "link" to pc104?


-- 
   Richard Huxton
   Archonet Ltd
FAQ