New topic: 

Conncetion to PostgreSql

<http://forums.realsoftware.com/viewtopic.php?t=38711>

         Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic          Author  
Message        abhimmit          Post subject: Conncetion to PostgreSqlPosted: 
Thu Apr 21, 2011 5:22 am                         
Joined: Mon Jan 10, 2011 1:29 pm
Posts: 4                Please I need your assistent;
I'm trying to connect to Postgresql database like below, but not luck;

  dim db as PostgreSQLDatabase
  dim rs as RecordSet
  
  call ReadSettings() ' Read an ini file.
  
  db = new PostgreSQLDatabase
  db.Host  =App.Server  ' Defined in the application properties
  db.Port=5432
  db.DatabaseName=App.Database
  db.UserName=App.Userid
  db.Password=App.Password
  
  if db.Connect then
  msgbox "Connect Ok"
  else
  msgbox "Connect KO"
  end if

--- I'm getting error (could not translate host name "L" to address: Unknown 
host". Apparantly db.Host is not
receiving the full value from App.Server. Which is "Localhost".


If I connect like below, then no problem;

I'm trying to connect to Postgresql database like below, but not luck;

  dim db as PostgreSQLDatabase
  dim rs as RecordSet
  
  
  call ReadSettings() ' Read an ini file.
  
  db = new PostgreSQLDatabase
  db.Host  ="Localhost"
  db.Port=5432
  db.DatabaseName="Mydatabase"
  db.UserName="MyuserID"
  db.Password="Mypassword"
  
  if db.Connect then
  msgbox "Connect Ok"
  else
  msgbox "Connect KO"
  end if   
                             Top            Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to