Click here to Skip to main content
15,895,256 members
Home / Discussions / Database
   

Database

 
GeneralRe: delete/modify stored procedure Pin
Edbert P9-Jun-04 20:02
Edbert P9-Jun-04 20:02 
GeneralRe: delete/modify stored procedure Pin
sharonz9-Jun-04 20:22
sharonz9-Jun-04 20:22 
GeneralRe: delete/modify stored procedure Pin
Edbert P9-Jun-04 20:32
Edbert P9-Jun-04 20:32 
GeneralRe: delete/modify stored procedure Pin
sharonz9-Jun-04 20:50
sharonz9-Jun-04 20:50 
GeneralT-SQL for backing up database with current Datetime Pin
Raybot8-Jun-04 23:55
Raybot8-Jun-04 23:55 
GeneralRe: T-SQL for backing up database with current Datetime Pin
RichardGrimmer9-Jun-04 1:30
RichardGrimmer9-Jun-04 1:30 
GeneralRe: T-SQL for backing up database with current Datetime Pin
Michael Potter9-Jun-04 6:17
Michael Potter9-Jun-04 6:17 
GeneralRe: T-SQL for backing up database with current Datetime Pin
Grimolfr9-Jun-04 9:39
Grimolfr9-Jun-04 9:39 
try this:

USE master
GO
DECLARE @curdate as char(8)
DECLARE @filePath as varchar(1024)

SET @curdate = (SELECT CONVERT(char(8), GETDATE(), 112))
SET @filePath = 'c:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\' + @curdate + '.bak'

EXEC sp_addumpdevice 'disk','MyNwind_1', @filePath


There are a couple of problems with your code. First, as already stated, you're trying to add an int to a varchar, which would cause problems. This isn't the error you're getting, but it would have been the next.

When you pass parameters into a proc via EXEC, you have to pass constants or variables. You can't pass expressions that must be evaluated. ("Path\" + @file + ".bak" would be an expression.)


Grim
(aka Toby)
MCDBA, MCSD, MCP+SB

GeneralRe: T-SQL for backing up database with current Datetime Pin
Raybot9-Jun-04 20:58
Raybot9-Jun-04 20:58 
QuestionHow to get list of SQL servers on network ? Pin
vgrigor18-Jun-04 22:55
vgrigor18-Jun-04 22:55 
AnswerRe: How to get list of SQL servers on network ? Pin
Hesham Amin9-Jun-04 0:21
Hesham Amin9-Jun-04 0:21 
QuestionHow i Can format Date in Sql Server 7.0 Pin
syed saba8-Jun-04 21:47
syed saba8-Jun-04 21:47 
AnswerRe: How i Can format Date in Sql Server 7.0 Pin
Hesham Amin9-Jun-04 6:50
Hesham Amin9-Jun-04 6:50 
GeneralRe: How i Can format Date in Sql Server 7.0 Pin
-Dr_X-9-Jun-04 15:30
-Dr_X-9-Jun-04 15:30 
Generalgetting value from newly inserted row Pin
sharonz8-Jun-04 20:54
sharonz8-Jun-04 20:54 
GeneralRe: getting value from newly inserted row Pin
Edbert P9-Jun-04 20:34
Edbert P9-Jun-04 20:34 
GeneralRe: getting value from newly inserted row Pin
sharonz9-Jun-04 20:50
sharonz9-Jun-04 20:50 
GeneralProbelm in Displaying records in 2 data grids Pin
orpus8-Jun-04 20:27
orpus8-Jun-04 20:27 
GeneralInserting Rows into Typed DataSets Pin
Member 11376038-Jun-04 17:43
Member 11376038-Jun-04 17:43 
GeneralRe: Inserting Rows into Typed DataSets Pin
Edbert P9-Jun-04 20:16
Edbert P9-Jun-04 20:16 
GeneralVC++ ADO Recordset Close Vs NULL Pin
Nemikesoria8-Jun-04 4:47
Nemikesoria8-Jun-04 4:47 
Generalsql reporting services Pin
robmays8-Jun-04 4:03
robmays8-Jun-04 4:03 
GeneralADO & GUID & C++ Pin
Mobileware8-Jun-04 0:46
Mobileware8-Jun-04 0:46 
QuestionI want to do a ETL tool. ADO is feasible? Pin
utiao7-Jun-04 21:27
utiao7-Jun-04 21:27 
AnswerRe: I want to do a ETL tool. ADO is feasible? Pin
Anonymous11-Jun-04 9:47
Anonymous11-Jun-04 9:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.