Showing posts with label public. Show all posts
Showing posts with label public. Show all posts

Friday, February 24, 2012

How to use C# DLL in Extended Stored Procedure?

Hello,

i have created one C# DLL

xp_hello.dll

Its having below code in Class1.cs

namespace xp_hello

{

public class Class1

{

public string xp_hello()

{

string strReturn = string.Empty;

strReturn = "Chirag Patel";

return strReturn;

}

}

}

i compiled that DLL and kept it in C drive.

now i am trying to create Extended stored procedure using

sp_addextendedproc 'xp_hello', 'c:\xp_hello.dll'

its showing successful creation.

Now i am trying to Execute it with

DECLARE @.txt varchar(33)

EXEC xp_hello @.txt OUTPUT

now its showing below message.

Msg 17751, Level 16, State 0, Procedure xp_hello, Line 1

Could not find the function xp_hello in the library xp_hello.dll. Reason: 127(The specified procedure could not be found.).

can anyone please help me out in this?

Thanks

Extended stored procedures are C++ coded. If you want to use the CLR you will have to use the SQL CLR project / the CLR integration in SQL Server. (which is available in SQL Server 2005)

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||

Hello Jens,

Thanks a lot.

its done. i able to call C# DLL from Stored Proc.

Great,

Thanks.

Sunday, February 19, 2012

How to use a public time server?

My computer that I want to keep synchronized with a public NTP time server
is a domain controller (W2k Sp4).
I'm looking at the net time command in the docs but I must be dense :-(
I suppose you gotta write a batch file that executes on startup defining the
NTP server to use so I got
net time /setsntp:tick.utoronto.ca
But executing that command does not change the current time on my machine.
When I then run net time set all it does is take the current tikje on the
machine and asks me if I want to change it to that, deuh?
Exactly how does one keep a machine synchronizing, not just on start up but
at regular intervals, with a public NTP server?
Any help appreciated.
RD
Sorry posted to wrong group
"RDufour" <rdufour@.sgiims.com> wrote in message
news:uxS$9vDmFHA.1444@.TK2MSFTNGP10.phx.gbl...
> My computer that I want to keep synchronized with a public NTP time server
> is a domain controller (W2k Sp4).
> I'm looking at the net time command in the docs but I must be dense :-(
> I suppose you gotta write a batch file that executes on startup defining
the
> NTP server to use so I got
> net time /setsntp:tick.utoronto.ca
> But executing that command does not change the current time on my machine.
> When I then run net time set all it does is take the current tikje on the
> machine and asks me if I want to change it to that, deuh?
> Exactly how does one keep a machine synchronizing, not just on start up
but
> at regular intervals, with a public NTP server?
> Any help appreciated.
> RD
>

How to use a public time server?

My computer that I want to keep synchronized with a public NTP time server
is a domain controller (W2k Sp4).
I'm looking at the net time command in the docs but I must be dense :-(
I suppose you gotta write a batch file that executes on startup defining the
NTP server to use so I got
net time /setsntp:tick.utoronto.ca
But executing that command does not change the current time on my machine.
When I then run net time set all it does is take the current tikje on the
machine and asks me if I want to change it to that, deuh?
Exactly how does one keep a machine synchronizing, not just on start up but
at regular intervals, with a public NTP server?
Any help appreciated.
RDSorry posted to wrong group
"RDufour" <rdufour@.sgiims.com> wrote in message
news:uxS$9vDmFHA.1444@.TK2MSFTNGP10.phx.gbl...
> My computer that I want to keep synchronized with a public NTP time server
> is a domain controller (W2k Sp4).
> I'm looking at the net time command in the docs but I must be dense :-(
> I suppose you gotta write a batch file that executes on startup defining
the
> NTP server to use so I got
> net time /setsntp:tick.utoronto.ca
> But executing that command does not change the current time on my machine.
> When I then run net time set all it does is take the current tikje on the
> machine and asks me if I want to change it to that, deuh?
> Exactly how does one keep a machine synchronizing, not just on start up
but
> at regular intervals, with a public NTP server?
> Any help appreciated.
> RD
>

How to use a public time server?

My computer that I want to keep synchronized with a public NTP time server
is a domain controller (W2k Sp4).
I'm looking at the net time command in the docs but I must be dense :-(
I suppose you gotta write a batch file that executes on startup defining the
NTP server to use so I got
net time /setsntp:tick.utoronto.ca
But executing that command does not change the current time on my machine.
When I then run net time set all it does is take the current tikje on the
machine and asks me if I want to change it to that, deuh?
Exactly how does one keep a machine synchronizing, not just on start up but
at regular intervals, with a public NTP server?
Any help appreciated.
RDSorry posted to wrong group
"RDufour" <rdufour@.sgiims.com> wrote in message
news:uxS$9vDmFHA.1444@.TK2MSFTNGP10.phx.gbl...
> My computer that I want to keep synchronized with a public NTP time server
> is a domain controller (W2k Sp4).
> I'm looking at the net time command in the docs but I must be dense :-(
> I suppose you gotta write a batch file that executes on startup defining
the
> NTP server to use so I got
> net time /setsntp:tick.utoronto.ca
> But executing that command does not change the current time on my machine.
> When I then run net time set all it does is take the current tikje on the
> machine and asks me if I want to change it to that, deuh?
> Exactly how does one keep a machine synchronizing, not just on start up
but
> at regular intervals, with a public NTP server?
> Any help appreciated.
> RD
>