Xojo Conferences
XDCMay2019MiamiUSA

[MBS] Problem getting connection in Web app with SQL Plugin to PostgreSQL (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] [ANN] 14.0pr5
Next thread: [MBS] Undocumented changes?


Re: [MBS] PortAudioStreamRecorderMBS issue   -   Garth Hjelte
  [MBS] Problem getting connection in Web app with SQL Plugin to PostgreSQL   -   José María Terry Jiménez <jt
   Re: [MBS] Problem getting connection in Web app with SQL Plugin to PostgreSQL   -   Christian Schmitz

[MBS] Problem getting connection in Web app with SQL Plugin to PostgreSQL
Date: 27.01.14 22:38 (Mon, 27 Jan 2014 22:38:09 +0100)
From: José María Terry Jiménez <jt
Hello

I'm trying to connect to a PostgreSQL database with a Web App and i get
a NilObjectException in the first line i show here (This is MacOSX 10.9,
in debug mode):

// Where is PostgreSQL's Library
Session.DBConnection.SetFileOption
Session.DBConnection.kOptionLibraryPostgreSQL,
GetFolderItem(library,FolderItem.PathTypeShell) <<< NilOE HERE

Session.DBConnection.Connect(server, userID, password,
SQLConnectionMBS.kPostgreSQLClient)

library is an String that contains "/Library/PostgreSQL/9.3/lib/libpq.dylib"

DBConnection is a Session property (DBConnection as SQLConnectionMBS)

(Almost) the same code run without problems in a terminal App (This has
no problem, library is the same, DBConnection is a SQLConnectionMBS in a
module):

DBConnection.SetFileOption DBConnection.kOptionLibraryPostgreSQL,
GetFolderItem(library,FolderItem.PathTypeShell)

DBConnection.Connect(server, userID, password,
SQLConnectionMBS.kPostgreSQLClient)

Is there any consideration about this in Web App that i'm missing (this
is my first tryings with Web Apps). I've searched the Xojo Forums for
FolderItems and Web, but no luck.

Thanks!

Best.
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Problem getting connection in Web app with SQL Plugin to PostgreSQL
Date: 27.01.14 23:14 (Mon, 27 Jan 2014 23:14:34 +0100)
From: Christian Schmitz

Am 27.01.2014 um 22:38 schrieb José María Terry Jiménez <<email address removed>>:

> Hello
>
> I'm trying to connect to a PostgreSQL database with a Web App and i get
> a NilObjectException in the first line i show here (This is MacOSX 10.9,
> in debug mode):
>
> // Where is PostgreSQL's Library
> Session.DBConnection.SetFileOption
> Session.DBConnection.kOptionLibraryPostgreSQL,
> GetFolderItem(library,FolderItem.PathTypeShell) <<< NilOE HERE

could you put output GetFolderItem in variable and check if it's nil.
Also does the NilObjectException have a message text?
Session and DBConnection are also not nil?

Sincerely
Christian

--