Hi,
Is there possible to write extended stored procedure (i.e. Delphi DLL) which
do insert (or other DML operation)? I saw some samples - but I didnt find
such kind.
Thanks and nice dayYes, it is possible to write extended stored procedures with Visual C++. SQ
L
Books Online provides information in the article "Creating Extended Stored
Procedures"
"Petez" wrote:
> Hi,
> Is there possible to write extended stored procedure (i.e. Delphi DLL) whi
ch
> do insert (or other DML operation)? I saw some samples - but I didnt find
> such kind.
> Thanks and nice day
>
Showing posts with label delphi. Show all posts
Showing posts with label delphi. Show all posts
Wednesday, March 21, 2012
extended stored procedure question
Hi,
Is there possible to write extended stored procedure (i.e. Delphi DLL) which
do insert (or other DML operation)? I saw some samples - but I didnt find
such kind.
Thanks and nice dayonly in C
"PeterZ" wrote:
> Hi,
> Is there possible to write extended stored procedure (i.e. Delphi DLL) whi
ch
> do insert (or other DML operation)? I saw some samples - but I didnt find
> such kind.
> Thanks and nice day
>|||Yes, see http://www.berenddeboer.net/article/1293/1293.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.
"PeterZ" <PeterZ@.discussions.microsoft.com> wrote in message
news:B59D6BDC-B73B-45B9-97B0-DD701953B3D8@.microsoft.com...
> Hi,
> Is there possible to write extended stored procedure (i.e. Delphi DLL)
> which
> do insert (or other DML operation)? I saw some samples - but I didnt find
> such kind.
> Thanks and nice day
>|||Finally, it is nice to see you here :)
Salesql
Is there possible to write extended stored procedure (i.e. Delphi DLL) which
do insert (or other DML operation)? I saw some samples - but I didnt find
such kind.
Thanks and nice dayonly in C
"PeterZ" wrote:
> Hi,
> Is there possible to write extended stored procedure (i.e. Delphi DLL) whi
ch
> do insert (or other DML operation)? I saw some samples - but I didnt find
> such kind.
> Thanks and nice day
>|||Yes, see http://www.berenddeboer.net/article/1293/1293.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.
"PeterZ" <PeterZ@.discussions.microsoft.com> wrote in message
news:B59D6BDC-B73B-45B9-97B0-DD701953B3D8@.microsoft.com...
> Hi,
> Is there possible to write extended stored procedure (i.e. Delphi DLL)
> which
> do insert (or other DML operation)? I saw some samples - but I didnt find
> such kind.
> Thanks and nice day
>|||Finally, it is nice to see you here :)
Salesql
Monday, March 19, 2012
extended stored procedure
Hi
I wrote a Delphi program to create a dll.after that, I added an extended
procedure to sql server using this dll. unfortunately this extended procedur
e
is too slow ( for excution on a table with 100000 rows, it takes 1 minute to
finish the extended procedure) . I recognized that the lack of speed arises
from communication between sql and delphi. writing this procedure by sql led
to worse performance.
what should I do to speed up the extended procedure?
Thanks."Tajik" <Tajik@.discussions.microsoft.com> wrote in message
news:1B4C8834-16CA-4B43-B691-9F385F3C437C@.microsoft.com...
> Hi
> I wrote a Delphi program to create a dll.after that, I added an extended
> procedure to sql server using this dll. unfortunately this extended
> procedure
> is too slow ( for excution on a table with 100000 rows, it takes 1 minute
> to
> finish the extended procedure) . I recognized that the lack of speed
> arises
> from communication between sql and delphi. writing this procedure by sql
> led
> to worse performance.
> what should I do to speed up the extended procedure?
> Thanks.
>
What does the extended proc do? I'm guessing you are calling the proc or
some other code once for each row. If I'm right then I don't think it will
scale well. Try to implement the same logic as set-based code using TSQL,
then call the TSQL proc from your Delphi code.
David Portas
SQL Server MVP
--
I wrote a Delphi program to create a dll.after that, I added an extended
procedure to sql server using this dll. unfortunately this extended procedur
e
is too slow ( for excution on a table with 100000 rows, it takes 1 minute to
finish the extended procedure) . I recognized that the lack of speed arises
from communication between sql and delphi. writing this procedure by sql led
to worse performance.
what should I do to speed up the extended procedure?
Thanks."Tajik" <Tajik@.discussions.microsoft.com> wrote in message
news:1B4C8834-16CA-4B43-B691-9F385F3C437C@.microsoft.com...
> Hi
> I wrote a Delphi program to create a dll.after that, I added an extended
> procedure to sql server using this dll. unfortunately this extended
> procedure
> is too slow ( for excution on a table with 100000 rows, it takes 1 minute
> to
> finish the extended procedure) . I recognized that the lack of speed
> arises
> from communication between sql and delphi. writing this procedure by sql
> led
> to worse performance.
> what should I do to speed up the extended procedure?
> Thanks.
>
What does the extended proc do? I'm guessing you are calling the proc or
some other code once for each row. If I'm right then I don't think it will
scale well. Try to implement the same logic as set-based code using TSQL,
then call the TSQL proc from your Delphi code.
David Portas
SQL Server MVP
--
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)