I have an extended stored procedure which converts two integers into a
float. It works on one server but it will not work on another. It
always returns null when I run it on one server and it works fine on
the other.
Any ideas as to what might cause this?Wild guess:
Regional settings for the SQL Server service account?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
<david.blunkell@.zeacom.com> wrote in message
news:53dd2195-d333-4182-934a-dd15a3404c5f@.a35g2000prf.googlegroups.com...
>I have an extended stored procedure which converts two integers into a
> float. It works on one server but it will not work on another. It
> always returns null when I run it on one server and it works fine on
> the other.
> Any ideas as to what might cause this?
Showing posts with label returns. Show all posts
Showing posts with label returns. Show all posts
Monday, March 19, 2012
Extended Property
How do I query the extended property of a column (like MS_Description
property). I run the following query and SqlServer returns nothing. But
I see the description in enterprise manager. Am I missing anything here
please?
SELECT *
FROM ::fn_listextendedproperty (N'MS_Description',
N'user', N'dbo', N'table', N'ED_Account', N'column', 'AccountID')Your query looks okay. Can you try the query below,
this should return all column descriptions for your table.
select value,col_name(id, smallid)
from sysproperties
where name='MS_Description'
and id=object_id('dbo.ED_Account')|||Thanks that works
markc...@.hotmail.com wrote:
> Your query looks okay. Can you try the query below,
> this should return all column descriptions for your table.
> select value,col_name(id, smallid)
> from sysproperties
> where name='MS_Description'
> and id=object_id('dbo.ED_Account')|||Note that sysproperties isn't documented and was removed in 2005 (replaced b
y a documented catalog
view). So, I do not recommend that you use it. I have a feeling that Mark su
ggested you the query
just to troubleshoot, verifying that there actually has been defined extende
d properties for this
object (etc.).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"S Chapman" <s_chapman47@.hotmail.co.uk> wrote in message
news:1149091258.427862.291020@.f6g2000cwb.googlegroups.com...
> Thanks that works
> markc...@.hotmail.com wrote:
>
property). I run the following query and SqlServer returns nothing. But
I see the description in enterprise manager. Am I missing anything here
please?
SELECT *
FROM ::fn_listextendedproperty (N'MS_Description',
N'user', N'dbo', N'table', N'ED_Account', N'column', 'AccountID')Your query looks okay. Can you try the query below,
this should return all column descriptions for your table.
select value,col_name(id, smallid)
from sysproperties
where name='MS_Description'
and id=object_id('dbo.ED_Account')|||Thanks that works
markc...@.hotmail.com wrote:
> Your query looks okay. Can you try the query below,
> this should return all column descriptions for your table.
> select value,col_name(id, smallid)
> from sysproperties
> where name='MS_Description'
> and id=object_id('dbo.ED_Account')|||Note that sysproperties isn't documented and was removed in 2005 (replaced b
y a documented catalog
view). So, I do not recommend that you use it. I have a feeling that Mark su
ggested you the query
just to troubleshoot, verifying that there actually has been defined extende
d properties for this
object (etc.).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"S Chapman" <s_chapman47@.hotmail.co.uk> wrote in message
news:1149091258.427862.291020@.f6g2000cwb.googlegroups.com...
> Thanks that works
> markc...@.hotmail.com wrote:
>
Monday, March 12, 2012
Extended Proc
Hi,
I have compiled a dll in delphi but I cannot use it as extended procedure(it
always returns null). Here is my source and usage in sql server:
--
library testdll;
uses
SysUtils,
Classes;
{$R *.res}
function xp_a:string;
begin
{for test}
result:='10';
end;
exports xp_a;
end.
________________________________________
_
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
exec sp_addextendedproc N'xp_a', N'testdll.dll'
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
________________________________________
_
declare @.a varchar(10)
exec master..xp_a @.a output
select @.a as output
--
Any help would be greatly appreciated.
LeilaYou can not return a string, you need to return it as an output parameter
instead, an XP always and only returns an integer.
See for examples and helper libraries:
http://www.howtodothings.com/viewar...spx?article=223
http://mastercluster.com/xproc.html
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Leila" <Leilas@.hotpop.com> wrote in message
news:OSr6YI6JFHA.2796@.tk2msftngp13.phx.gbl...
> Hi,
> I have compiled a dll in delphi but I cannot use it as extended
> procedure(it
> always returns null). Here is my source and usage in sql server:
> --
> library testdll;
> uses
> SysUtils,
> Classes;
> {$R *.res}
> function xp_a:string;
> begin
> {for test}
> result:='10';
> end;
> exports xp_a;
> end.
> ________________________________________
_
> SET QUOTED_IDENTIFIER OFF
> GO
> SET ANSI_NULLS OFF
> GO
> exec sp_addextendedproc N'xp_a', N'testdll.dll'
> GO
> SET QUOTED_IDENTIFIER OFF
> GO
> SET ANSI_NULLS ON
> GO
> ________________________________________
_
> declare @.a varchar(10)
> exec master..xp_a @.a output
> select @.a as output
> --
> Any help would be greatly appreciated.
> Leila
>
>
I have compiled a dll in delphi but I cannot use it as extended procedure(it
always returns null). Here is my source and usage in sql server:
--
library testdll;
uses
SysUtils,
Classes;
{$R *.res}
function xp_a:string;
begin
{for test}
result:='10';
end;
exports xp_a;
end.
________________________________________
_
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
exec sp_addextendedproc N'xp_a', N'testdll.dll'
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
________________________________________
_
declare @.a varchar(10)
exec master..xp_a @.a output
select @.a as output
--
Any help would be greatly appreciated.
LeilaYou can not return a string, you need to return it as an output parameter
instead, an XP always and only returns an integer.
See for examples and helper libraries:
http://www.howtodothings.com/viewar...spx?article=223
http://mastercluster.com/xproc.html
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Leila" <Leilas@.hotpop.com> wrote in message
news:OSr6YI6JFHA.2796@.tk2msftngp13.phx.gbl...
> Hi,
> I have compiled a dll in delphi but I cannot use it as extended
> procedure(it
> always returns null). Here is my source and usage in sql server:
> --
> library testdll;
> uses
> SysUtils,
> Classes;
> {$R *.res}
> function xp_a:string;
> begin
> {for test}
> result:='10';
> end;
> exports xp_a;
> end.
> ________________________________________
_
> SET QUOTED_IDENTIFIER OFF
> GO
> SET ANSI_NULLS OFF
> GO
> exec sp_addextendedproc N'xp_a', N'testdll.dll'
> GO
> SET QUOTED_IDENTIFIER OFF
> GO
> SET ANSI_NULLS ON
> GO
> ________________________________________
_
> declare @.a varchar(10)
> exec master..xp_a @.a output
> select @.a as output
> --
> Any help would be greatly appreciated.
> Leila
>
>
Subscribe to:
Posts (Atom)