Showing posts with label return. Show all posts
Showing posts with label return. Show all posts

Monday, March 26, 2012

no date retrun

hi all i have question about this procedure

when i write this the data return this is nice ok

USE [DigitalFirm]

GO

/****** Object: StoredProcedure [dbo].[SearchTaskName] Script Date: 05/31/2007 21:44:47 ******/

SETANSI_NULLSON

GO

SETQUOTED_IDENTIFIERON

GO

ALTERProcedure [dbo].[SearchTaskName]

(

@.TaskNamevarchar(50)

)

as

select a.TaskId,a.TaskName,p.fullName,a.Sdate,a.Fdate

from Assign_Task a,Task_Emp te,Personal p,Employee e

where te.TaskId=a.TaskIdand te.IDNO=e.IDNOand p.SSN=e.IDNOand a.TaskName=@.TaskName

and when i write this procedure in Sql server 2005

the i can show data and it is right and work

then when i want to exam this procedur in my web no have any data

please tell me why??

USE [DigitalFirm]

GO

/****** Object: StoredProcedure [dbo].[SearchTaskName] Script Date: 05/31/2007 21:44:47 ******/

SETANSI_NULLSON

GO

SETQUOTED_IDENTIFIERON

GO

ALTERProcedure [dbo].[SearchTaskName]

(

@.TaskNamevarchar(50)

)

as

select a.TaskId,a.TaskName,p.fullName,a.Sdate,a.Fdate

from Assign_Task a,Task_Emp te,Personal p,Employee e

where te.TaskId=a.TaskIdand te.IDNO=e.IDNOand p.SSN=e.IDNOand a.TaskNamelike'@.TaskName%'

thanx

Try this:

select a.TaskId,a.TaskName,p.fullName,a.Sdate,a.Fdatefrom Assign_Task a,Task_Emp te,Personal p,Employee ewhere te.TaskId=a.TaskIdand te.IDNO=e.IDNOand p.SSN=e.IDNOand a.TaskNamelike @.TaskName +'%'
|||

hi thanx mrndinakar you are nice manEmbarrassed

this is nice help for me .Stick out tongue

thanx

|||

it_amani:

hi thanx mrndinakar you are nice manEmbarrassed

this is nice help for me .Stick out tongue

thanx

You are welcome.Smile

|||

thax

mmmm

i want ask about another problem

when i update record from my web and i have value is null , the record not update

how i can solve this problem

thanx mrndinakar

|||

There could be lot of things involved. Post the UPDATE script you have. Does the script work if you run it from query analyzer?

|||

thanx i solve it . in incurved way(in arabic language toroq moltaweya)

but i wana to put my code and my query

Try

Dim idAsString

id = Request.QueryString("id").ToString()

If CheckBox1.Checked =TrueThen

fun.Update_Employee(id, fullname.Text, jobtitle.Text, salary.Text, sdate.Text, F_Date.Text, depno.SelectedValue, Active.SelectedValue, Username.Text, Pass.Text, Type.SelectedValue)

Label3.Text ="Update Employee Information are sucessful"

Else

fun.Update_Employee1(id, fullname.Text, jobtitle.Text, salary.Text, sdate.Text, depno.SelectedValue, Active.SelectedValue, Username.Text, Pass.Text, Type.SelectedValue)

Label3.Text ="Update Employee Information are sucessful"

EndIf

this is to the first Update

ALTERProcedure [dbo].[update_Employee]

(

@.IDNOnumeric(18,0),

@.fullNamevarchar(50),

@.Job_Titlevarchar(50),

@.Salaryint,

@.S_Datedatetime,

@.F_Datedatetime,

@.DepNonumeric(18,0),

@.Activebit,

@.Usernamevarchar(20),

@.Passvarchar(20),

@.ID_Type_idnumeric(18,0)

)

As

update Employeeset Job_Title=@.Job_Title,Salary=@.Salary,S_Date=@.S_Date,F_Date=@.F_Date,DepNo=@.DepNo,active=@.Active

where IDNO=@.IDNO

updateLogInset Username=@.Username,Pass=@.Pass,ID_Type_id=@.ID_Type_id

Where IDNO=@.IDNO

update Personalset fullName=@.fullName

Where SSN=@.IDNO

Catch exAs Exception

Label3.Text = ex.Message

and this to the second Update

ALTERProcedure [dbo].[update_Employee2]

(

@.IDNOnumeric(18,0),

@.fullNamevarchar(50),

@.Job_Titlevarchar(50),

@.Salaryint,

@.S_Datedatetime,

@.DepNonumeric(18,0),

@.Activebit,

@.Usernamevarchar(20),

@.Passvarchar(20),

@.ID_Type_idnumeric(18,0)

)

As

update Employeeset Job_Title=@.Job_Title,Salary=@.Salary,S_Date=@.S_Date,DepNo=@.DepNo,active=@.Active

where IDNO=@.IDNO

updateLogInset Username=@.Username,Pass=@.Pass,ID_Type_id=@.ID_Type_id

Where IDNO=@.IDNO

update Personalset fullName=@.fullName

WhereSSN=@.IDNO

thanx

No Data Returned for report

Hi,

In RS 2005, if a specific query does not return any rows, the table also is not displayed in the report.

Is there any way to get around this and show an empty table?

Manish

Hi,

select all the cells and in the properties make "borderstyle" - "Solid"

and select the table and make same as above in the properties.

you can see the empty table.

Amarnath

|||

One option is to set the "NoRows" property of the table. You can also apply styles to that message.

-- Robert

|||

This is correct but only if the table has a Header or Footer row.

If the dataset associated with a table returns no data, and there is no "NoRows" message specified for the table, AND if there is a header or footer, the table will be shown.

-chris

Friday, March 23, 2012

No data in Data Mining cube.

Hi,

I've created a Cluster data mining model and seems to correctly return data. However I've created a data mining dimension and cube but when I go to query the cube it doesn't return any data if I select any members on the data mining dimension. Any suggestions to where I can look to resolve this?

Thanks

Sanjay

Hi,

I found out how to see the data in the cube. I was using the data mining dimension in relation with the dimension it was based on. So now I can see data for the years that I've trained my model on. Is there anyway to make the cube predict the values for the other years in the cube with data?

Thanks

Sanjay

|||

Are you saying that for example you've created a cluster model on a set of items, and you want to see the cluster values for items not in the set? And you want the slicing behavior to work against those values as well?

If this is the case, unfortunately, that's not the way it works. The cluster dimension is only on the cases for which it was trained. You could apply the clustering to the data outside the cube, write the results to a table and process it as a regular dimension, though.

|||

Hi,

Ideally yes. For example if I generate a cluster model and train it with a couple of years data, potentially I would then like to use the data mining dimension and cube to predict or classify the current years data. I will look to use your suggestion.

Thanks

Sanjay

Tuesday, March 20, 2012

No "Open Table" In SQL Server 2005?

In Enterprise Manager for SQL Server 2000, I used to choose "Open Table..."
and then "Return All rows" to be able to update data directly into a grid.
This tool was rapid and useful, but i'm not able to find a such tool in SQL
Server 2005 environment... Is there a tool like this? If not, somebody know
why Microsoft has removed a awesome tool like it'
David.
Thanks(a) you must be using an old beta:
http://www.aspfaq.com/sql2005/show.asp?id=5
(b) please post SQL Server 2005 questions to the SQL Server 2005 newsgroups:
http://www.aspfaq.com/sql2005/show.asp?id=1
"David Parenteau" <DavidParenteau@.discussions.microsoft.com> wrote in
message news:2344C393-7600-4041-BE01-5E0A10AE33D4@.microsoft.com...
> In Enterprise Manager for SQL Server 2000, I used to choose "Open
> Table..."
> and then "Return All rows" to be able to update data directly into a grid.
> This tool was rapid and useful, but i'm not able to find a such tool in
> SQL
> Server 2005 environment... Is there a tool like this? If not, somebody
> know
> why Microsoft has removed a awesome tool like it'
> David.
> Thanks

Wednesday, March 7, 2012

NewLine and Carriage return issue in PDF format

If I insert the following expression in a textbox it will display
correctly in HTML format but not in PDF format. Can anyone show me how
to accomplish the same thing so that it will display correctly in both
HTML and and PDF format.
vbCrLf & vbCrLf & vbCrLf & "My Text"
In HTML format, it will display "My Text" on the 4th "row". Whereas in
PDF format, it displays "My Text" on the first row of the textbox.This has to be an issue (bug) with PDF and how it formats initial blank
space before the literal text. I am not sure if this is addressed in a
service pack for 2000 or in 2005 (I am using 2000 to test this) but here is
a workaround that I found that places an ASCII record seperator in the first
position before the CRLF's as:
=CHR(30)&vbCrLf & vbCrLf & vbCrLf & "My Text"
That should work.
Rodney Landrum
<Nergock@.gmail.com> wrote in message
news:1143588675.322590.215140@.u72g2000cwu.googlegroups.com...
> If I insert the following expression in a textbox it will display
> correctly in HTML format but not in PDF format. Can anyone show me how
> to accomplish the same thing so that it will display correctly in both
> HTML and and PDF format.
> vbCrLf & vbCrLf & vbCrLf & "My Text"
> In HTML format, it will display "My Text" on the 4th "row". Whereas in
> PDF format, it displays "My Text" on the first row of the textbox.
>

NewID

Hello,

I use VB.Net and SQL CE 2.0. I'd like to start using UniqueIdentifier fields as my primary keys.

I saw that this would return a NewID value

System.Guid.NewGuid().ToString()

however, it is not supported in Compact Framework. So how can one obtain the next NewId()?

Thank you.

NewGuid() is supported in .NET CF 2.0. You can also have a look at this article: http://msdn2.microsoft.com/en-us/library/aa446557.aspx - Generating GUIDs on the Pocket PC

Monday, February 20, 2012

Newbie: Now getting return value, but need help debugging OLE DB Command Transformation

Good morning, all,

OK, I have read a ton of posting on this issue, but either they don't give enough information or they are for packages which use the Execute SQL command, whereas I am using the OLE DB Command Data Flow Transformation.

I have an Excel spreadsheet that we are receiving from agencies with rows of client data which I have to load into an application that is ready to go live. I also have a stored procedure spClientsInsertRcd, which was written for the application. In the normal flow of the application, the stored procedure is called from a Coldfusion page, which does some processing prior to calling it. So, I have written a 'wrapper' stored procedure, spImportAgencyData, which does the processing and then calls the spClientInsertRcd.

My dataflow has the following components:

An Excel Source, containing my test data, consisting of just one row of data,

which points to a

Derived Column Transformation, which reformats the SSN and adds a user variable, named returnValue with an Expression value of @.[User::returnvariable] set to a four-byte signed integer, which (i think) I need to get the value out of the stored procedure.

which points to a

Data Conversion Transformation, which takes care of all the datatype conversions

which points to a

OLE DB Command, which contains the following as the SQL Command:

exec ?= spImportAgencyData ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?

In the OLE DB Command, I have mapped returnValue, my user variable to @.RETURN_VALUE.

Right now, I am in initial testing. The dataflow shows that it is succeeding, but my one data record for testing is not getting inserted. I need to get the value of returnValue to figure out what is happening.

How do I get the value of the returnValue? I have tried putting a recordset destination after the OLE DB command, but that just gives me the data that went into the OLE DB Command.

Thanks,
Kathryn

OK,

I have made a few changes to the package and I can get a return value. The problem is that the data, which is currently only one row in an Excel worksheet, is not getting loaded.

The OLE DB Command's SQL Command is now:

exec spImportAgencyData ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? output

with the final parameter being an output parameter. On the Column Mappings tab, I have mapped the output parameter @.returnValue which is in the Available Destination Columns to the returnValue variable (in the Available Input Columns) I created earlier in the Derived Column Transformation.

I have added a recordset Destination after the OLE DB Command and I only have the returnValue column in it.

The returnValue is always being returned as 0, which is either because I am not mapping it correctly or because the data is not getting loaded, I'm not sure which.

I can run the stored procedure from SQL Server Management Studio as

DECLARE @.returnValue int

EXEC [dbo].[spImportAgencyData]

@.URN = NULL,

@.FirstName = N'Kathryn',

@........

@.returnValue = @.returnValue OUTPUT

SELECT @.returnValue as N'@.returnValue'

and the correct new ClientID is returned, so the stored procedure is working. I have put a Data Viewer right before the OLE DB Command and run the stored procedure with the exact data coming from the Excel spreadsheet, just to double check and it runs and returns the new Client ID.

Does anyone have any tips on debugging this problem?

Thanks,
Kathryn

|||I had a similar issue (return a value from a stored procedure with 2 Varchar parameters), and eventually this is how I configured the Execute SQL Task:

General:

Connection Type: OLE DB
SQL Statemenet: EXEC ? = AUDIT.LoggingStoredProcedure ?, ?
Bypass Prepare: True

Parameter Mapping:

[Variable Name] | [Direction] | [Data Type] | [Parameter Name]
User::ReturnValue | Return Value | Long | 0
User::Parameter1 | Input | VARCHAR | 1
USer::Parameter2 | Input | VARCHAR | 2


Newbie: Now getting return value, but need help debugging OLE DB Command Transformation

Good morning, all,

OK, I have read a ton of posting on this issue, but either they don't give enough information or they are for packages which use the Execute SQL command, whereas I am using the OLE DB Command Data Flow Transformation.

I have an Excel spreadsheet that we are receiving from agencies with rows of client data which I have to load into an application that is ready to go live. I also have a stored procedure spClientsInsertRcd, which was written for the application. In the normal flow of the application, the stored procedure is called from a Coldfusion page, which does some processing prior to calling it. So, I have written a 'wrapper' stored procedure, spImportAgencyData, which does the processing and then calls the spClientInsertRcd.

My dataflow has the following components:

An Excel Source, containing my test data, consisting of just one row of data,

which points to a

Derived Column Transformation, which reformats the SSN and adds a user variable, named returnValue with an Expression value of @.[User::returnvariable] set to a four-byte signed integer, which (i think) I need to get the value out of the stored procedure.

which points to a

Data Conversion Transformation, which takes care of all the datatype conversions

which points to a

OLE DB Command, which contains the following as the SQL Command:

exec ?= spImportAgencyData ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?

In the OLE DB Command, I have mapped returnValue, my user variable to @.RETURN_VALUE.

Right now, I am in initial testing. The dataflow shows that it is succeeding, but my one data record for testing is not getting inserted. I need to get the value of returnValue to figure out what is happening.

How do I get the value of the returnValue? I have tried putting a recordset destination after the OLE DB command, but that just gives me the data that went into the OLE DB Command.

Thanks,
Kathryn

OK,

I have made a few changes to the package and I can get a return value. The problem is that the data, which is currently only one row in an Excel worksheet, is not getting loaded.

The OLE DB Command's SQL Command is now:

exec spImportAgencyData ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? output

with the final parameter being an output parameter. On the Column Mappings tab, I have mapped the output parameter @.returnValue which is in the Available Destination Columns to the returnValue variable (in the Available Input Columns) I created earlier in the Derived Column Transformation.

I have added a recordset Destination after the OLE DB Command and I only have the returnValue column in it.

The returnValue is always being returned as 0, which is either because I am not mapping it correctly or because the data is not getting loaded, I'm not sure which.

I can run the stored procedure from SQL Server Management Studio as

DECLARE @.returnValue int

EXEC [dbo].[spImportAgencyData]

@.URN = NULL,

@.FirstName = N'Kathryn',

@........

@.returnValue = @.returnValue OUTPUT

SELECT @.returnValue as N'@.returnValue'

and the correct new ClientID is returned, so the stored procedure is working. I have put a Data Viewer right before the OLE DB Command and run the stored procedure with the exact data coming from the Excel spreadsheet, just to double check and it runs and returns the new Client ID.

Does anyone have any tips on debugging this problem?

Thanks,
Kathryn

|||I had a similar issue (return a value from a stored procedure with 2 Varchar parameters), and eventually this is how I configured the Execute SQL Task:

General:

Connection Type: OLE DB
SQL Statemenet: EXEC ? = AUDIT.LoggingStoredProcedure ?, ?
Bypass Prepare: True

Parameter Mapping:

[Variable Name] | [Direction] | [Data Type] | [Parameter Name]
User::ReturnValue | Return Value | Long | 0
User::Parameter1 | Input | VARCHAR | 1
USer::Parameter2 | Input | VARCHAR | 2