connecting to the database

Поиск
Список
Период
Сортировка
От viksa verma
Тема connecting to the database
Дата
Msg-id afvktr$1tta$1@news.hub.org
обсуждение исходный текст
Список pgsql-general
Hi,

I have some trouble making connection to the database.
This is what I use.

 EXEC SQL CONNECT TO
            tcp:postgresql://vikas.verma.com:5334/mydbname user vikasverma;

It works fine when I hard code the values like this.
But i want to use macros which i want to define in some other file and
include it.

Something like this

EXEC SQL CONNECT TO
    tcp:postgresql://DB_IP:DB_PORT/DB_NAME user USER;

where DB_IP,DB_NAME,DB_PORT etc are macros defined in some file which i will
include.

Please help with this.

Question 2
If i have to define something in an include file lets say

myheader.h
EXEC SQL DEFINE NUM 20;

then do i have to include this as EXEC SQL INCLUDE myheader.h or #include
myheader.h.


Vikas.



В списке pgsql-general по дате отправления:

Предыдущее
От: teknokrat@yahoo.com (teknokrat)
Дата:
Сообщение: Can someone tell me if this is possible
Следующее
От: "Manuel W."
Дата:
Сообщение: Re: PostgreSQL 7.2.1 on SuSE Linux with Coldfusion MX