Thread: Error Message: invalid command-line arguments for server process

Error Message: invalid command-line arguments for server process

From
"Anthony Brock (KG4AGD)"
Date:
I am getting an error trying to connect to PostgreSQL db using Visual
Basic.NET 2005. The error message is "FATAL: invalid command-line
arguments for server process. HINT: Try "postgres --help" for more
information."

Here is a the snippet of code to create connection. Looking for
suggestions on what the problem may be and how to solve it. We just
made the switch recently from MSSQL to PostgreSQL 8.2.


Private sConnString As String _
                 = "Provider=PostgreSQL;Addr=127.0.0.1;User
ID=postgres;Password=ourpassword;Database=AUDIOCAT"
     Private objConn As New OleDbConnection(sConnString)
     Private objCmd As New OleDbCommand

     Public Function dbOpenConn() As Boolean

         Try
             objConn.Open()
             objCmd.Connection = objConn
         Catch ex As Exception
             'Console.WriteLine(ex.Message)
             OutputToLog("ERROR (Opening Database Connection): " & ex.Message)
             frmMain.lblStatus.Text = "Error Occurred! Check
application log for details."
             Return False
         End Try
         Return True

     End Function


Re: Error Message: invalid command-line arguments for server process

From
Tom Lane
Date:
"Anthony Brock (KG4AGD)" <kg4agd@foundations.edu> writes:
> I am getting an error trying to connect to PostgreSQL db using Visual
> Basic.NET 2005. The error message is "FATAL: invalid command-line
> arguments for server process. HINT: Try "postgres --help" for more
> information."

This implies incorrect option switches supplied either through the
postmaster's -o command-line option, or from the client side through
the "options" part of the startup packet.  The -o part would affect
all clients, so if you are able to connect at all (eg with psql)
you can reject that theory.  Unfortunately I dunno anything about
VB.NET and have no idea what might make it put options in the startup
packet --- there's certainly nothing suggesting it in your connection
string.  Are there any GUI configuration dialogs anywhere controlling
database connection parameters?  Another longshot is that traditionally
PG clients have interpreted the PGOPTIONS environment variable as
containing an option string, but it seems a bit unlikely that that
would be set in a Windows context (and I don't know whether VB honors it
anyway).

            regards, tom lane