Home > Archive > Pgadmin > April 2005 > Error Report









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Error Report
Amitava Sengupta

2005-04-09, 8:26 pm

Hello,

I'm trying to connect Postgres database through .NET, through OLEDB with following connection string and code
string conn = " Provider=PostgreSQL;
Host=localhost;Passw
ord=pwd;User Id=postgres;Database
=psdb;";

OleDbConnection myConnection = new OleDbConnection(conn
);

OleDbDataAdapter myCommand = new OleDbDataAdapter(sql
. ToString(),myConnect
ion);

myCommand.SelectCommand.CommandType = CommandType.Text;

myCommand.Fill(ds, "tblpsdb");

But it is throwing an error as follows :

System.Data.OleDb.OleDbException: FATAL: invalid command-line arguments for server process
HINT: Try "postgres --help" for more information.
at System.Data.OleDb.OleDbConnection. ProcessResults(Int32
hr)
at System.Data.OleDb.OleDbConnection.CreateSession()
at System.Data.OleDb.OleDbConnection.Open()
at System.Data.Common.DbDataAdapter. QuietOpen(IDbConnect
ion connection, ConnectionState& originalState)
at System.Data.Common.DbDataAdapter. FillFromCommand(Obje
ct data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)

Am I missing something? Please let me know how can I connect by OLEDB through .NET. Following are the information regarding the environment :

Platform you're running on : Win2000 Pro
Language : C#
Distribution you used (source tarball, or binary) : postgresql-8.0.1.zip
Version you tested : Release 8.0.1, Release date : 2005-01-31

Also let me know how can I export a database from SQL Server to PostGres, as I found some tables not being exported in the process.

Regards,
Amitava Sengupta
Programmer Analyst


Web Spiders (India) Pvt. Ltd.
51B, Justice Chandra Madhav Road
Calcutta 700 020. India
Phone: 91.33.2474.3581 to 85
Fax: 91.33.2474.3500
http://www.webspiders.com
(ISO 9001:2000 and IC 9700 Certified. Microsoft Gold Certified Partner)


Calcutta (India), Birmingham (UK), Toronto (Canada), San Francisco (USA)

--------------------------------------------------------------------------------

Disclaimer: The opinions expressed within this message are those of the author and not necessarily those of the firm The information contained in this message is intended only for the recipient, may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please be aware that any dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the message and deleting it from your computer or any other device.

--------------------------------------------------------------------------------

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com