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.
Any ideas?Code:-- 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")

Reply With Quote