Click here to Skip to main content
15,888,527 members
Home / Discussions / Database
   

Database

 
AnswerRe: problem when creating database independant access layer Pin
Paddy Boyd3-Apr-07 23:55
Paddy Boyd3-Apr-07 23:55 
GeneralRe: problem when creating database independant access layer Pin
Hassan Amaar5-Apr-07 1:49
Hassan Amaar5-Apr-07 1:49 
GeneralRe: problem when creating database independant access layer Pin
Paddy Boyd5-Apr-07 2:29
Paddy Boyd5-Apr-07 2:29 
AnswerRe: problem when creating database independant access layer Pin
Hayder Marzouk4-Apr-07 2:26
Hayder Marzouk4-Apr-07 2:26 
GeneralRe: problem when creating database independant access layer Pin
Hassan Amaar5-Apr-07 1:51
Hassan Amaar5-Apr-07 1:51 
Questiondatabase deletion Pin
jithbiz00333-Apr-07 20:51
jithbiz00333-Apr-07 20:51 
AnswerRe: database deletion Pin
Paddy Boyd3-Apr-07 23:07
Paddy Boyd3-Apr-07 23:07 
QuestionThe data types varchar and image are incompatible in the add operator in sql server 2005 Pin
24891283-Apr-07 20:04
24891283-Apr-07 20:04 
Hi all!
i have writing an stored procedure in sql server 2005 which are given below ...

Create procedure [dbo].[DGV_UpdateUser]
(
@uId nvarchar(100),
@uName nvarchar(300),
@uEmail nvarchar(300),
@uState nvarchar(300),
@Picture Image
)
AS
BEGIN TRAN

DECLARE @SQL_Query varchar(8000)

IF(EXISTS(SELECT * FROM Users WHERE Uid = @uId))
BEGIN
SET @SQL_Query = 'UPDATE Users SET Name = ''' + @uName + ''', Email = ''' + @uEmail + ''''
IF(@uState IS NOT NULL)
SET @SQL_Query = @SQL_Query + ', State = ' + @uState
IF(@Picture IS NOT NULL)
SET @SQL_Query = @SQL_Query + ', Picture = ' + @Picture
SET @SQL_Query = @SQL_Query + ' WHERE Uid = ''' + @uId + ''''
EXEC(@SQL_Query)
--print @SQL_Query
END

IF(@@error<>0)
ROLLBACK
ELSE
COMMIT

When i press F5 to create this procedure, i have faced following error:-

Msg 402, Level 16, State 1, Procedure DGV_UpdateUser, Line 21
The data types varchar and image are incompatible in the add operator.
----------------------------------------------------------------------
i have try to cast @Picture into Varchar but i have not successed to remove error. Can any one help me?

Thanks & Regards,
SAMir Nigam,
Software Developer,
STPL, Lucknow, India.

AnswerRe: The data types varchar and image are incompatible in the add operator in sql server 2005 Pin
Colin Angus Mackay3-Apr-07 21:02
Colin Angus Mackay3-Apr-07 21:02 
GeneralRe: The data types varchar and image are incompatible in the add operator in sql server 2005 Pin
24891283-Apr-07 21:10
24891283-Apr-07 21:10 
GeneralRe: The data types varchar and image are incompatible in the add operator in sql server 2005 Pin
Colin Angus Mackay3-Apr-07 21:32
Colin Angus Mackay3-Apr-07 21:32 
AnswerRe: The data types varchar and image are incompatible in the add operator in sql server 2005 Pin
24891283-Apr-07 22:03
24891283-Apr-07 22:03 
GeneralRe: The data types varchar and image are incompatible in the add operator in sql server 2005 Pin
Colin Angus Mackay3-Apr-07 22:43
Colin Angus Mackay3-Apr-07 22:43 
GeneralRe: The data types varchar and image are incompatible in the add operator in sql server 2005 Pin
24891284-Apr-07 0:00
24891284-Apr-07 0:00 
QuestionQuerying Microsoft Active Directory (Windows Server 2003) from SQL Server Pin
rachitdamani3-Apr-07 19:55
rachitdamani3-Apr-07 19:55 
AnswerRe: Querying Microsoft Active Directory (Windows Server 2003) from SQL Server Pin
Hayder Marzouk4-Apr-07 21:55
Hayder Marzouk4-Apr-07 21:55 
GeneralRe: Querying Microsoft Active Directory (Windows Server 2003) from SQL Server Pin
rachitdamani4-Apr-07 23:33
rachitdamani4-Apr-07 23:33 
Questionconverting data fields to columns Pin
chandru703-Apr-07 18:01
chandru703-Apr-07 18:01 
AnswerRe: converting data fields to columns Pin
Tirthadip3-Apr-07 18:13
Tirthadip3-Apr-07 18:13 
GeneralRe: converting data fields to columns Pin
chandru703-Apr-07 21:20
chandru703-Apr-07 21:20 
AnswerRe: converting data fields to columns Pin
Jaiprakash M Bankolli3-Apr-07 18:39
Jaiprakash M Bankolli3-Apr-07 18:39 
QuestionSQL SERVER 2005 NETWORK CONFIGURATION Pin
POL953-Apr-07 11:17
POL953-Apr-07 11:17 
QuestionDataGridview ??? Pin
kindman_nb3-Apr-07 6:16
kindman_nb3-Apr-07 6:16 
AnswerRe: DataGridview ??? Pin
Jaiprakash M Bankolli3-Apr-07 7:38
Jaiprakash M Bankolli3-Apr-07 7:38 
AnswerRe: DataGridview ??? Pin
sudhakar_vaddepalli4-Apr-07 1:43
sudhakar_vaddepalli4-Apr-07 1:43 

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.