boku
03-28-2009, 01:17 PM
I'm trying to use a button to send a cmd to the sql database, but the following code seems to be giving me troubles.
-- Get ROOT "D:\"
FullSystemPath = Shell.GetFolder(SHF_STARTMENU);
SysRoot = String.Left(FullSystemPath, 3);
-- inData is an input box with a database name which is the sql server
-- in this case its filled with "IHOFFICEDATA" as the database name.
BackUp = Input.GetText("inData");
-- This is the command I'm using, nothing happens.
ODBC.ExecuteSQL("backup database " .. BackUp .. " to disk = '" .. SysRoot .. BackUp .. ".bak' GO");
--I even tried this too, still nothing.
ODBC.ExecuteSQL("BACKUP DATABASE IHOFFICEDATA to disk = 'D:\IHOFFICEDATA.bak' GO")
Any ideas?
-- Get ROOT "D:\"
FullSystemPath = Shell.GetFolder(SHF_STARTMENU);
SysRoot = String.Left(FullSystemPath, 3);
-- inData is an input box with a database name which is the sql server
-- in this case its filled with "IHOFFICEDATA" as the database name.
BackUp = Input.GetText("inData");
-- This is the command I'm using, nothing happens.
ODBC.ExecuteSQL("backup database " .. BackUp .. " to disk = '" .. SysRoot .. BackUp .. ".bak' GO");
--I even tried this too, still nothing.
ODBC.ExecuteSQL("BACKUP DATABASE IHOFFICEDATA to disk = 'D:\IHOFFICEDATA.bak' GO")
Any ideas?