I'm trying to backup my database through ODBC with vb.net but can't find a way.
Some of many approaches:
Try
btCommand = New OdbcCommand("pg_dump '" + mydatabase + "' > 'all.sql'", mCon)
'OR
' btCommand = New OdbcCommand("BACKUP DATABASE '" + mydatabase + "', 'all.sql'", mCon)
btCommand.ExecuteNonQuery()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical + MsgBoxStyle.OkOnly)
End Try
But no one works. Please advice on how to do this.