Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
VB.NET Community
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
C#
Windows Forms
Redirect pgdump.exe output into RichTextBox
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Skydiver, post: 26833, member: 11639"] The correct approach is to have the [icode]Filename[/icode] point to pg_dump.exe (with the full path), and for the [icode]Arguments[/icode] be set to the normal arguments you would use if you writing this at the command line. [icode]UseShellExecute[/icode] should be set to false, and [icode]RedirectStandardOutput[/icode] and [icode]RedirectStandardError[/icode] set to true. If needed also set the [icode]WorkingDirectory[/icode]. As to why "pg_dump.exe" is behaving that way, maybe it has some code that detects whether the standard output and error is being redirected or not. I recall using some only console programs that had some fancy progress updates (without having to fallback to using ANSI ESC codes), but did not output any of the progress update information if the output was piped to another program or redirected to a file. I would suggest trying to run the following at the command line, [code] C:\Backup_PostgreSQL\pg_dump.exe --verbose --host=127.0.0.1 --port=5432 --username=radio --format=c --compress=6 --schema=newradio -d RNO --file C:\backupDB\RNO20211123 > output.txt 2>errors.txt [/code] Check the contents of output.txt and errors.txt. Do they contain the expected progress information you were hoping to display into your rich text box? [/QUOTE]
Insert quotes…
Verification
Post reply
C#
Windows Forms
Redirect pgdump.exe output into RichTextBox
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top
Bottom