Showing posts with label input. Show all posts
Showing posts with label input. Show all posts

Thursday, March 29, 2012

DataType Problem

Hi,

I want to pass data to the stored procedure by vb code.One of the input parameters of the SP has Text Data Type.whats the equivalent of this datatype in vb?

Thanks in Advance.

You can use byte array (byte[]) for BLOB data type (text/ntext/image) in SQL Server:)

Wednesday, March 21, 2012

Dataset

Hi,
I have 30 datasets in my report. But I will be using these datasets based on
the input parameter. Say if the input parameter value is 10 then I will use
first 10 datasets. if the parameter value is 15 i will be using first 15
datasets and so on.
If the parameter value is 10. Then I am excuting the remaining 20 datasets
for no use. which i am not going to use.
Is there a way that I can execute the datasets conditionally based on the
input parameters.
/
SNope, they all will execute.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"ERS Developer" <ERSDeveloper@.discussions.microsoft.com> wrote in message
news:6F6EDF32-CFD7-4757-9E34-E50BD29C0B3E@.microsoft.com...
> Hi,
> I have 30 datasets in my report. But I will be using these datasets based
> on
> the input parameter. Say if the input parameter value is 10 then I will
> use
> first 10 datasets. if the parameter value is 15 i will be using first 15
> datasets and so on.
> If the parameter value is 10. Then I am excuting the remaining 20 datasets
> for no use. which i am not going to use.
> Is there a way that I can execute the datasets conditionally based on the
> input parameters.
> /
> S|||On Apr 9, 12:36 pm, "Bruce L-C [MVP]" <bruce_lcNOS...@.hotmail.com>
wrote:
> Nope, they all will execute.
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "ERS Developer" <ERSDevelo...@.discussions.microsoft.com> wrote in message
> news:6F6EDF32-CFD7-4757-9E34-E50BD29C0B3E@.microsoft.com...
> > Hi,
> > I have 30 datasets in my report. But I will be using these datasets based
> > on
> > the input parameter. Say if the input parameter value is 10 then I will
> > use
> > first 10 datasets. if the parameter value is 15 i will be using first 15
> > datasets and so on.
> > If the parameter value is 10. Then I am excuting the remaining 20 datasets
> > for no use. which i am not going to use.
> > Is there a way that I can execute the datasets conditionally based on the
> > input parameters.
> > /
> > S
In short, Bruce is correct; however:
The best work around would be to include an input parameter in the
stored procedures/queries that are sourcing the datasets and if the
parameter value is not set, don't execute the remainder of the stored
procedure. This could be accomplished by using a conditional statement
for each stored procedure that bypasses all actions in the stored
procedure, based on the parameter value passed to it.
Regards,
Enrique Martinez
Sr. Software Consultantsql

Thursday, March 8, 2012

DataFile and Log File

I want to know the datafile and log file for the given input parameter. I am
basically creating function and the input parameter would be database name
and that will return me DataFile and the LogFile.
Can anybody tell me which query I have to used in the function. I have to
used to get the DataFile and LogFile
Have a look at the sys.database_files catalog view in BOL.
Andrew J. Kelly SQL MVP
"Rogers" <naissani@.hotmail.com> wrote in message
news:OsKzR7QiHHA.5008@.TK2MSFTNGP02.phx.gbl...
>I want to know the datafile and log file for the given input parameter. I
>am basically creating function and the input parameter would be database
>name and that will return me DataFile and the LogFile.
> Can anybody tell me which query I have to used in the function. I have to
> used to get the DataFile and LogFile
>
|||In SQL Server 2000?
Thanks
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:OGIt1IRiHHA.392@.TK2MSFTNGP06.phx.gbl...
> Have a look at the sys.database_files catalog view in BOL.
> --
> Andrew J. Kelly SQL MVP
> "Rogers" <naissani@.hotmail.com> wrote in message
> news:OsKzR7QiHHA.5008@.TK2MSFTNGP02.phx.gbl...
>
|||On Sat, 28 Apr 2007 10:42:15 -0400, Roger wrote:

>In SQL Server 2000?
Hi Roger,
A more polite way to write this would have been; "Oh, I'm sorry I forgot
to include in my original post that I'm using SQL Server 2000. Is there
an alternative method for that version?"
The answer to that question would have been to check the sysfiles system
table in Books Online.
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis

Wednesday, March 7, 2012

DataDirection output Problems

I have the below code. When the SqlParameter is created the @.UserID is set as input instead of output. anyone have any ideas why this is happining and how I can get it to work. I can create the variable as a single parameter and set the direction to output and it works but when I try it in the code below it won't work. Any help will be appreciated

Endeavor

Dim parametersAs SqlParameter() = {New SqlParameter("@.strSex", Data.SqlDbType.Char, 50), _New SqlParameter("@.intRace", Data.SqlDbType.Int), _New SqlParameter("@.intAge", Data.SqlDbType.Int), _New SqlParameter("@.UserID", Data.SqlDbType.SmallInt, Data.ParameterDirection.Output)}The overload that takes 3 parameters does not have the direction as the 3rd parameter. If you want to do it that way, you'll need the full overload that takes the 10ish parameters.|||

Thanks for your help. OK I don't need all of the rest of the parameters. Is there any way to make the variable an output and still keep it in the array or add it to the array after creating the sqlparameter.

Endeavor

|||cmd.Parameter("@.Name").ParameterDirection=Output