M
mr.potato
Hi all,
I have encountered a problem when I tried to code a auto-save macro for
saving project in database, the "overwrite dialog" has came out while saveas
function was being run. After I have applied the "displayAlerts = False" in
the begining, the error has prompted out....
Does any method can overwrite duplicate project without pop-up message?
On top of that , I've also tried to write a macro for deleting the existing
project before save, but it's fail. The error message is " [Microsoft][ODBC
SQL Server Driver]Communication link failure " , attacehed below is my code.
Dim db_sql As String
Dim db_con As Object
Dim db_rec As Object
db_sql = "SELECT PROJ_NAME FROM MSP_PROJECTS WHERE PROJ_NAME = 'abc' "
db_rec.Open db_sql, db_con
If Not db_rec.BOF And Not db_rec.EOF Then Application.DeleteFromDatabase
Name:=<HELLO>\abc, userID:="sa", databasePassword:="xxxx",
formatID:="MSProject.ODBC"
ActiveProject.SaveAs Name:=<HELLO>\abc, userID:="sa",
databasePassword:="xxxx", formatID:="MSProject.ODBC"
Thanks & Regards,
smallPotato.
I have encountered a problem when I tried to code a auto-save macro for
saving project in database, the "overwrite dialog" has came out while saveas
function was being run. After I have applied the "displayAlerts = False" in
the begining, the error has prompted out....
Does any method can overwrite duplicate project without pop-up message?
On top of that , I've also tried to write a macro for deleting the existing
project before save, but it's fail. The error message is " [Microsoft][ODBC
SQL Server Driver]Communication link failure " , attacehed below is my code.
Dim db_sql As String
Dim db_con As Object
Dim db_rec As Object
db_sql = "SELECT PROJ_NAME FROM MSP_PROJECTS WHERE PROJ_NAME = 'abc' "
db_rec.Open db_sql, db_con
If Not db_rec.BOF And Not db_rec.EOF Then Application.DeleteFromDatabase
Name:=<HELLO>\abc, userID:="sa", databasePassword:="xxxx",
formatID:="MSProject.ODBC"
ActiveProject.SaveAs Name:=<HELLO>\abc, userID:="sa",
databasePassword:="xxxx", formatID:="MSProject.ODBC"
Thanks & Regards,
smallPotato.