OK this is what I got, i have a stored procedure that updates a foxpro database through a linked server. Here is the stored procedure:
CREATE procedure PKUpdateF
@custno as varchar(6),
@password as varchar(6),
@sql as varchar
AS
set @sql = 'UPDATE OPENQUERY(tester, ''select password from test1.dbf where custno ='+convert(varchar(20),@custno)+''')'
set @sql = @sql + ' set password='''+@password + ''''
exec(@sql)
GO
Now I'm trying to execute it in query analyzer and I'm not sure what to set the @sql variable to. My code looks like this:
Use PKPRO
GO
exec PKUpdateF
@password = hello,
@custno = test,
@sql = ?(dont know what to set it to)
Thanks in advance!
Software Engineer
Team Lead
damn bill gates, he has everything
CREATE procedure PKUpdateF
@custno as varchar(6),
@password as varchar(6),
@sql as varchar
AS
set @sql = 'UPDATE OPENQUERY(tester, ''select password from test1.dbf where custno ='+convert(varchar(20),@custno)+''')'
set @sql = @sql + ' set password='''+@password + ''''
exec(@sql)
GO
Now I'm trying to execute it in query analyzer and I'm not sure what to set the @sql variable to. My code looks like this:
Use PKPRO
GO
exec PKUpdateF
@password = hello,
@custno = test,
@sql = ?(dont know what to set it to)
Thanks in advance!
Software Engineer
Team Lead
damn bill gates, he has everything