Showing posts with label enter. Show all posts
Showing posts with label enter. Show all posts

Tuesday, March 27, 2012

Failed to Net Send to the address '%s'

i'm trying to setup operators on one of our SQL Server.
On the server locally i can open a command window, and enter
>net send TargetMachine message
and it works.
But SQL Server agent says, when i test send the message, "Failed to Net Send
to the address '%s'"
Agent is logging on with a valid domain account.Can you please post your code.
Peter
>--Original Message--
>i'm trying to setup operators on one of our SQL Server.
>On the server locally i can open a command window, and
enter
>>net send TargetMachine message
>and it works.
>But SQL Server agent says, when i test send the
message, "Failed to Net Send
>to the address '%s'"
>Agent is logging on with a valid domain account.
>
>.
>|||Start->Programs->Microsoft SQL Server->Enterprise Manager
Expand your server.
Managment->SQL Server Agent->Operators
Double click an operator
Net send address: Type in a user name or machine name
Click "Test"
"Peter the Spate" <anonymous@.discussions.microsoft.com> wrote in message
news:68cb01c4756f$b3a19fb0$a501280a@.phx.gbl...
> Can you please post your code.
> Peter
>
> >--Original Message--
> >i'm trying to setup operators on one of our SQL Server.
> >
> >On the server locally i can open a command window, and
> enter
> >>net send TargetMachine message
> >
> >and it works.
> >
> >But SQL Server agent says, when i test send the
> message, "Failed to Net Send
> >to the address '%s'"
> >
> >Agent is logging on with a valid domain account.
> >
> >
> >.
> >

Sunday, February 19, 2012

Extracting Parameter values from a Custom Data Processing Extension

I've created a custom Data Processing Extension and I've implemented the IDBCommandAnalysis interface so that my reports can enter parameters and pass them to my Data Processing Extension.

My question is, how do I extract the value from the Parameters coming from the report? Where do the parameters get passed off from the report? I can query the Parameters collection and my report gets prompted in Preview mode to enter something for the parameter but I can't find the spot where it gets passed for processing.

The IDBCommand interface contains a method CreateParameter(...).

For every query parameter, RS will call CreateParameter to add the parameter to the Parameters collection.

See also: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_ref_clr_dataproc_2a4a.asp

-- Robert

|||Where is the proper place to initialize the Parameter collection? I keep getting a "Collection was modified" when I try to tell my Command object was parameters it has.|||

Robert Bruckner MSFT wrote:

For every query parameter, RS will call CreateParameter to add the parameter to the Parameters collection.

Sorry for pullig out this old thread, but it's exactly the problem I have right now.
At the moment my CreateParameter()-Function looks like this (like in the FSI example)

Code Snippet

Return CType(New DataParameter, IDataParameter)


nothing more. As an extra, I am searching for parameters everytime the command-text is set. I am pullig out the parameters from the text with a regExp and add them to the collection.
Is this the right way?

In technet it says: "The CreateParameter method is called by the report server to set the name and value for each query parameter in the command text. The parameter is then added to the Parameters collection prior to the ExecuteReader method being called."

Right now, I am doing all of that in my cde manually:
set command-text? then get parameters from string -> add all of them to the collection.

without this extra-step after setting the command-text, the collection gets called later and would be empty. There is no call from report-server to CreateParameter. (I put traces in every function/sub)|||Ok, I worked it out:

"Public ReadOnly Property Parameters() As IDataParameterCollection Implements IDbCommand.Parameters"
This one is used by the server to access and build up the parameterCollection.

"Public Function GetParameters() As IDataParameterCollection Implements IDbCommandAnalysis.GetParameters"
This one has to parse out all parameters from the query, so the dataset preview can list them.
http://technet.microsoft.com/en-us/library/aa256673(SQL.80).aspx

Extracting Parameter values from a Custom Data Processing Extension

I've created a custom Data Processing Extension and I've implemented the IDBCommandAnalysis interface so that my reports can enter parameters and pass them to my Data Processing Extension.

My question is, how do I extract the value from the Parameters coming from the report? Where do the parameters get passed off from the report? I can query the Parameters collection and my report gets prompted in Preview mode to enter something for the parameter but I can't find the spot where it gets passed for processing.

The IDBCommand interface contains a method CreateParameter(...).

For every query parameter, RS will call CreateParameter to add the parameter to the Parameters collection.

See also: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_ref_clr_dataproc_2a4a.asp

-- Robert

|||Where is the proper place to initialize the Parameter collection? I keep getting a "Collection was modified" when I try to tell my Command object was parameters it has.
|||

Robert Bruckner MSFT wrote:


For every query parameter, RS will call CreateParameter to add the parameter to the Parameters collection.

Sorry for pullig out this old thread, but it's exactly the problem I have right now.
At the moment my CreateParameter()-Function looks like this (like in the FSI example)

Code Snippet

Return CType(New DataParameter, IDataParameter)


nothing more. As an extra, I am searching for parameters everytime the command-text is set. I am pullig out the parameters from the text with a regExp and add them to the collection.
Is this the right way?

In technet it says: "The CreateParameter method is called by the report server to set the name and value for each query parameter in the command text. The parameter is then added to the Parameters collection prior to the ExecuteReader method being called."

Right now, I am doing all of that in my cde manually:
set command-text? then get parameters from string -> add all of them to the collection.

without this extra-step after setting the command-text, the collection gets called later and would be empty. There is no call from report-server to CreateParameter. (I put traces in every function/sub)
|||Ok, I worked it out:

"Public ReadOnly Property Parameters() As IDataParameterCollection Implements IDbCommand.Parameters"
This one is used by the server to access and build up the parameterCollection.

"Public Function GetParameters() As IDataParameterCollection Implements IDbCommandAnalysis.GetParameters"
This one has to parse out all parameters from the query, so the dataset preview can list them.
http://technet.microsoft.com/en-us/library/aa256673(SQL.80).aspx

extracting numbers from a memo field

Hi all
I have a field on a database thats generally used to enter notes.
Within these are mobile phone numbers.
Im not sure what the code is to enter in the formula to display only mobile numbers from this notes field ?
Any help will be appreciated
ThanksHi! I'm trying to do the same thing.
There is a formula to do this on the Crystal website (http://support.businessobjects.com/library/kbase/articles/c2011892.asp) but I can't figure out how to incorporate it into my report. Maybe you will have better luck!

Let me know if it works for you!