Hello All;
This is a two part problem...
First, i am trying to execute the call
C:\Program Files\PostgreSQL\8.1\bin>pg_dump focus > \\10.1.65.30\smbtest\backup.
backup
AND the seccond is...
I need the password to be passed from the program
Below is my code thus far, and if you haven't noticed, I am using postgreSQL
Code:
// test-app.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
//system("c:\progra~1\PostgreSQL\8.1\bin\pg_dump focus > \\10.1.65.30\smbtes\backup.backup");
int i;
puts ("Trying to execute command PG_DUMP");
i = system ("pg_dump focus > \\10.1.65.30\smbtest\backup.backup");
if (i==-1) puts ("Error executing PG_DUMP");
else puts ("Command successfully executed");
system ("pause");
return 0;
return 0;
}
Windows Xp machine...and also note that the actual command fromt the command line does indeed work just not when the system does it..i think it has to do with the \'s