Showing posts with label call. Show all posts
Showing posts with label call. Show all posts

Monday, March 12, 2012

Possible to use Calendar control with date parameter?

SQL 2005 on XP Pro.
I want to call up a Calendar Control when a user enters a report parameter which is a date. Is this possible? I am using the out-of-the-box SQL Srvr Reporting Services, not a custom implementation.

Thanks in advanceThis is supported. A calendar control will be displayed for date parameters that do not have a valid values list.|||

Calender control comes automatically once you define a report parameter as datetime.

Amarnath

Friday, March 9, 2012

Possible to pass table as parametr to stored procedure??

In one stored procedure i create temporary table and fill it with data,
after this i call to other stored procedure to which i want pass table as
parameter.
How can i do it '
Message posted via http://www.webservertalk.comNo there is not way without looping through a resultset and giving the
seperate fields as variables or as an "array".
http://vyaskn.tripod.com/passing_ar..._procedures.htm
But you could create a (gobal) temp table from another procedure and call
this temp table at the destination procedure.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"JB via webservertalk.com" <forum@.nospam.webservertalk.com> schrieb im Newsbeitrag
news:c902681f62414d1cb7c0a8dca5cea43e@.SQ
webservertalk.com...
> In one stored procedure i create temporary table and fill it with data,
> after this i call to other stored procedure to which i want pass table as
> parameter.
> How can i do it '
> --
> Message posted via http://www.webservertalk.com|||See if this helps: http://www.sommarskog.se/share_data.html
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"JB via webservertalk.com" <forum@.nospam.webservertalk.com> wrote in message
news:c902681f62414d1cb7c0a8dca5cea43e@.SQ
webservertalk.com...
> In one stored procedure i create temporary table and fill it with data,
> after this i call to other stored procedure to which i want pass table as
> parameter.
> How can i do it '
> --
> Message posted via http://www.webservertalk.com|||Hi
Or you can create a Table using the Table Data Type and pass that between
SP's.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote in
message news:OJND4SbTFHA.2128@.TK2MSFTNGP15.phx.gbl...
> No there is not way without looping through a resultset and giving the
> seperate fields as variables or as an "array".
> http://vyaskn.tripod.com/passing_ar..._procedures.htm
>
> But you could create a (gobal) temp table from another procedure and call
> this temp table at the destination procedure.
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
>
> "JB via webservertalk.com" <forum@.nospam.webservertalk.com> schrieb im
> Newsbeitrag news:c902681f62414d1cb7c0a8dca5cea43e@.SQ
webservertalk.com...
>|||Thanks for replay.
In my sp i define:
DECLARE @.myTable TABLE(
[col1] [int] ,
[col2] [bit] ,
..........
..........
if i understand i can do the same and to declare as @.@.myTable
and from now i can use this tabel in all proc?
Message posted via http://www.webservertalk.com|||thanks however it not help me. (i've read it before).
Message posted via http://www.webservertalk.com|||can u give a sample? i don't really undersatand how to achieve it
Message posted via http://www.webservertalk.com|||You cannot pass a table variable as parameter to stored procedures. But if
you look at the article I posted in my previous post, you will find a way
out
--
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"JB via webservertalk.com" <forum@.webservertalk.com> wrote in message
news:053b03bed2fe474fb8510840a324d760@.SQ
webservertalk.com...
> can u give a sample? i don't really undersatand how to achieve it
> --
> Message posted via http://www.webservertalk.com|||O yes.. u r right my mistake, sorry
Thank u very much.
Message posted via http://www.webservertalk.com|||Hi
See if it helps you
Use Northwind
CREATE PROC mysp2
AS
SELECT * FROM #Test
GO
CREATE PROC mysp1--Main stored procedure
@.Ord INT
AS
CREATE TABLE #Test
(
cust CHAR(5)
)
INSERT INTO #Test SELECT Customerid FROM Orders WHERE OrderId=@.Ord
EXEC mysp2 --We will use the #Test temp table within mysp2
--Usage
EXEC mysp1 10248
DROP PROC mysp1,mysp2
"JB via webservertalk.com" <forum@.webservertalk.com> wrote in message
news:fcd2f7925c90404592916ac6c168bcc5@.SQ
webservertalk.com...
> thanks however it not help me. (i've read it before).
> --
> Message posted via http://www.webservertalk.com

Possible to OPENXML() from URL?

Is it possible to get the XML Document for a call to OPENXML() from a URL
directly?
Example: I have a .NET web service that returns XML based on parameters
submitted to the URL. I'd like to be able to write a TSQL batch that gets
XML documents from this server and processes them using OPENXML to update
rows in a SQL table.
Anyone ever done something like this?
TIA
Paul
Have you considered using an XML template? Templates accept parameters, much in the same way as stored procedures.
I've written an article on this topic, which you can find at the following URL:
http://www.sqljunkies.com/Article/53...3C8ECACDC.scuk
Hope this helps!
Denise.
Denise E. White
Technical Director
The Next Version UK
www.thenextversion.com
www.denisewhite.co.uk

Wednesday, March 7, 2012

possible to call a table valued User Defined Function thru ODBC

I want to be able to call a SQL Server User Defined Function that is a
table valued UDF. I have existing code that uses ODBC and calling UDFs
is going to be a lot easier than calling stored procedures, as the
syntax is close to using a table itself (at least in T-SQL it is).
But, I suspect that only scalar-valued functions can be called, but
please tell me otherwise.
I don't believe you can return a TABLE variable from a UDF
directly through to ODBC.
How is calling a UDF simpler than calling a stored procedure?
By the way, if you want the database layer written for you in
ADO.NET (if you are using .NET...), you can use this code
generator (source code included).
http://www.eggheadcafe.com/articles/..._generator.asp
2005 Microsoft MVP C#
Robbe Morris
http://www.masterado.net
http://www.mastervb.net
"fpdave" <deroberts100@.hotmail.com> wrote in message
news:1106230769.823842.53790@.z14g2000cwz.googlegro ups.com...
>I want to be able to call a SQL Server User Defined Function that is a
> table valued UDF. I have existing code that uses ODBC and calling UDFs
> is going to be a lot easier than calling stored procedures, as the
> syntax is close to using a table itself (at least in T-SQL it is).
> But, I suspect that only scalar-valued functions can be called, but
> please tell me otherwise.
>

possible to call a table valued User Defined Function thru ODBC

I want to be able to call a SQL Server User Defined Function that is a
table valued UDF. I have existing code that uses ODBC and calling UDFs
is going to be a lot easier than calling stored procedures, as the
syntax is close to using a table itself (at least in T-SQL it is).
But, I suspect that only scalar-valued functions can be called, but
please tell me otherwise.I don't believe you can return a TABLE variable from a UDF
directly through to ODBC.
How is calling a UDF simpler than calling a stored procedure?
By the way, if you want the database layer written for you in
ADO.NET (if you are using .NET...), you can use this code
generator (source code included).
http://www.eggheadcafe.com/articles...e_generator.asp
2005 Microsoft MVP C#
Robbe Morris
http://www.masterado.net
http://www.mastervb.net
"fpdave" <deroberts100@.hotmail.com> wrote in message
news:1106230769.823842.53790@.z14g2000cwz.googlegroups.com...
>I want to be able to call a SQL Server User Defined Function that is a
> table valued UDF. I have existing code that uses ODBC and calling UDFs
> is going to be a lot easier than calling stored procedures, as the
> syntax is close to using a table itself (at least in T-SQL it is).
> But, I suspect that only scalar-valued functions can be called, but
> please tell me otherwise.
>

Saturday, February 25, 2012

Possible Concurrency Issues.

Hi,
I was wondering if it is possible to call a stored procedure from sql server 2005 (call it sp_1) that calls an assembly which takes a message, wraps it in soap and calls a webservice and waits for a reply from that webservice (the stored procedure is clr not t-sql). This WebService needs to then call sp_1 to perform some other tasks. Is this possible or does sp_1 need to have finished what it was doing before it can be called again.

I have been trying to do this and have received a number of errors one of which looks like;

'The context connection is already in use.'

Sorry if I haven't worded it very well, I will try to clear up any questions if you need me to.

Thanks
N
Dont worry about replying to this, I have done some more research and the I was trying to open multiple context connections when only 1 is allowed at a time, which was creating the error.