PgSqlDump to remote db on Linux

PgSqlDump to remote db on Linux

Postby genii90 » Tue 17 Sep 2013 03:21

I have the following code that is executed against a database that is located on a linux server.

Code: Select all
using (PgSqlConnection conn = new PgSqlConnection(Constants.ConnectionString))
                {
                    conn.Open();
                    using (PgSqlDump pgSqlDump = new PgSqlDump { Connection = conn, Schema = "myschema", IncludeDrop = false, Mode = Devart.Common.DumpMode.Data })
                    {
                        pgSqlDump.Backup();
                        using (StreamWriter stream = new StreamWriter(file))
                        {
                            stream.WriteLine(pgSqlDump.DumpText);
                            stream.Close();
                        }
                    }
                    conn.Close();
                }


The call completes but the dumped text has just the following data:

SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
SET default_tablespace = '';
SET default_with_oids = false;


Is PgSqlDump able to get data from Linux hosted database? Note, the code ran successfully before on Windows postgres database.
genii90
 
Posts: 3
Joined: Tue 17 Sep 2013 02:56

Re: PgSqlDump to remote db on Linux

Postby genii90 » Wed 18 Sep 2013 02:13

I am using Devart.Data.dll v5.0.781.0 and Devart.Data.Postgres.dll v6.8.322.0
genii90
 
Posts: 3
Joined: Tue 17 Sep 2013 02:56

Re: PgSqlDump to remote db on Linux

Postby genii90 » Thu 19 Sep 2013 02:30

Solved.
My Schema property of PgSqlDump object was incorrect.
genii90
 
Posts: 3
Joined: Tue 17 Sep 2013 02:56


Return to dotConnect for PostgreSQL