Returning Data From Webservice To SSIS

Jul 14, 2007

Hello,



I am trying to use the data returned by a webservice that our application team has built.



What method should they use to return the data to the caller ?

If they try to retun a data set the SSIS is saying that it is not a well formated XML.



The webservice is using an API call to HIS, can I make this call using C# or some other mechanisam directly from SSIS?

View 3 Replies


ADVERTISEMENT

WCF Webservice Through SSIS

Apr 30, 2008

Hi

I need to populate a table B by selecting a from table A but for every single record selected from Table A for some of the feilds i need to pass it to a WCF webservice and do some tasks.

Can somebody show me an example of this i am completely clueless on how to invoke a WCF webservice for every single row fetched from a database.

A step by step example would be of great help.

regards
Hrishy

View 6 Replies View Related

Can SSIS Package Be Run From WebService?

Feb 15, 2006

Dear,

Can SSIS package be run from WebService?

P.S. SSIS package and Webservice are located in the same computer.



Thanks much!

View 9 Replies View Related

SSIS To Run A Webservice Times Out

Oct 24, 2006

We have a package that runs a webservice. The webservice connects to exchange for multiple mail accounts so it sometimes takes awhile to run.

If run from SQL Server Management Studio, it usually completes, but may occassionally time out.

If run from a job (i.e. we want this scheduled) then it NEVER completes successfully - althought there is very little information about what the error was. It seems to fail too quickly to be a time out error...

Any idea why this is happening? Or how to prevent it from timing out? Is there a way to initiate the webservice asynchronously from SSIS?

View 4 Replies View Related

How To Invoke SSIS Package As A Webservice

May 31, 2007

Hi Guys,
Anyone can tell me, How to invoke ssis package as webservice ?
Is it possible ? If yes How ?


Yogesh V. Desai. | SQLDBA|

View 2 Replies View Related

Server Error : Launching SSIS Using A Webservice And Asp.net

Jan 16, 2007

Hey guys,

I have a webservice set up on the same box where my SSIS packages sit at. I have an ASP.net app which calls the webservice. The webservice in turn invokes the ssis package and , I run it on file system.

i keep getting this error

System.Web.Services.Protocols.SoapException was unhandled by user code
Message="Server was unable to process request. ---> That assembly does not allow partially trusted callers."
Source="System.Web.Services"
Actor=""
Lang=""
Node=""
Role=""
StackTrace:
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at CallDummyWebServ.com.bls.cmndev2.LaunchSSISPackageServiceCS.LaunchPackage(String sourceType, String sourceLocation, String packageName) in D:ProjectsCallDummyWebServCallDummyWebServWeb Referencescom.bls.cmndev2Reference.cs:line 78
at CallDummyWebServ._Default.btnSayHello_Click(Object sender, EventArgs e) in D:ProjectsCallDummyWebServCallDummyWebServDefault.aspx.cs:line 26
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

I tried to set up the impersonation on both the asp.net 2.0 config and web.config .. but the problem is stil haunting me .. any help or suggestions would be greatly appreciated.

View 5 Replies View Related

Integration Services :: SSIS Package With Webservice As Destination

Oct 25, 2010

I have a table is SQL server database A that is my source. I have another database B which is accessed via webservice call.(its a CRM server basically). My intention is to transfer data from A to B while B is accessible only via web service. I need to update existing one and create the missing one.

Currently I am using script component, and on every insertion of a row, i call the webservice to check if the record exist or not. If it exist I update it else create it using webservice call itself.

All this happen in Input0_ProcessInputRow(Input0Buffer Row) function.

Now this method is making 2n webserive call which is making the performance very slow.
 
I want to optimize the approach. Is there a way where I can retrieve whole set of rows in source table in preexecute(), filter it and store it in a List. This way, i just need to check the list a perform update ro create accordingly preventing my webservice call.

How to optimize this or even some better approach?

Its actually a CRM server and I am trying to update and create contacts in CRM sync with a database.

View 3 Replies View Related

Integration Services :: Calling Webservice In SSIS Through Script Task

Jun 29, 2015

I am searching for a solution for Calling or consume a web service in SSIS through Script task. I have gone through so many links but i am able to find the exact solution. I am getting so many references, though i am unable to crack it.

My requirement is i need to call a web service URL through script task which is having a client certificate. When we are trying to connect to the URL it will ask for the certificate authentication. After calling this URL we will get a WSDL file from the web service, We need to consume that WSDL file and we need to identify the methods inside this WSDL and need to write the data available in this WSDL to the data base tables.

How can we call that web service URL( With certificate) through script task and how can we read the WSDL file and How we can load the data into DB table.

View 8 Replies View Related

Importing Data Using WebService

Jul 15, 2005

Hello,

View 7 Replies View Related

Data From Wcf-webservice / Object Parameter

Oct 1, 2007

hi,

i have a wcf webservice method with a "GetPropertyDetailsRequest" object as parameter.

GetPropertyDetailsRequest Object:
<GetPropertyDetailsRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="WZ.Services.Sso.20070423">
<MessageId xmlns="WZ.Services.200709.1">00000000-0000-0000-0000-000000000000</MessageId>
<ApplicationGuid>04030201-0605-0807-090a-0b0c0d0e0f10</ApplicationGuid>
<ApplicationSoapKey>04030201-0605-0807-090a-0b0c0d0e0f10</ApplicationSoapKey>
<UserGuid i:nil="true" />
<ActiveDate>2007-09-12T12:33:47.793157+02:00</ActiveDate>
<DetailLevels>NoDependencies</DetailLevels>
<IDs>
<GlobalKey>
<IDs xmlns4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:anyType xmlns5p1="http://www.w3.org/2001/XMLSchema" i:type="d5p1:int">9</d4p1:anyType>
</IDs>
<KeyType>Subscription</KeyType>
</GlobalKey>
<GlobalKey>
<IDs xmlns4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:anyType xmlns5p1="http://www.w3.org/2001/XMLSchema" i:type="d5p1:int">90</d4p1:anyType>
</IDs>
<KeyType>Subscription</KeyType>
</GlobalKey>
<GlobalKey>
<IDs xmlns4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:anyType xmlns5p1="http://www.w3.org/2001/XMLSchema" i:type="d5p1:int">900</d4p1:anyType>
</IDs>
<KeyType>Subscription</KeyType>
</GlobalKey>
</IDs>
<PropertyCodes xmlns2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1tring>PropertyCodeFilter1</d2p1tring>
<d2p1tring>PropertyCodeFilter2</d2p1tring>
<d2p1tring>PropertyCodeFilter3</d2p1tring>
</PropertyCodes>
<Unique>true</Unique>
<requestedApplicationGuid i:nil="true" />
</GetPropertyDetailsRequest>


is it possible to include the GetPropertyDetailsRequest object as parameter for the XML Datasource in Reporting Services? i have try it so

<Query>

<SoapAction>http://tempuri.org/GetData</SoapAction>
<Method Namespace="http://tempuri.org/" Name="GetData">


<Parameters>

<Parameter name="request" type="GetPropertyDetailsRequest">

<!-- ..... -->
<!--GetPropertyDetailsRequest -->
<!-- ..... -->
</Parameter>
</Parameters>

<Query>


but i get an error, that the webservice method (GetDetails(GetPropertyDetailsRequest request) ) needs an object as parameter .
can you help me?

View 1 Replies View Related

Updating Local Data On Device From Sql Server, Via Webservice

Dec 12, 2006

I want to update data on the device which has a sql server mobile database.

the main database is sql server.

I use web services to enable the mobile application to access the server.

Can anyone recommend a way of updating the data on the device without using replication? I basically want to read a dataset from the server via webservice and put this in to local db - but not row by row as too many records.

Regards

View 1 Replies View Related

Returning SSIS Stored Procedure Name

Dec 29, 2006

Hi

I am currently trying to write a number of processe's to keep track of what information is held in my SSIS package. The package I have created is rather large and it would prove a long labourious process to look through every task to see what stored procedure has been used.

What I wanted to do was write a stored procedure in SQL Server 2005 that pick's up each package name and checks for any stored procedures used and returns the names of these stored procedures and any other relevant information i.e required variables.

So far I have managed to create a stored procedure that picks up the name(s) of the packages but I am stuck after this.

Declare @Filename varchar(1000)
Declare @cmd varchar(1000)

Create table #dir (Filename varchar(1000))
Insert #dir
Exec master..xp_cmdshell 'dir /B C:DevelopmentSumColumnSumColumn*.dtsx'
delete #dir where Filename is null or Filename like '%not found%'
Select @Filename = ''
While @Filename < (select max(Filename) from #dir)

drop table #dir

Any help would be appreciated.

Thanks

View 3 Replies View Related

Returning A NULL Value In An SSIS Expression

Dec 5, 2006

Greetings SSIS friends,

I have the following expression but it doesn't seem to evaluate



findstring(eventstatus, "O", 1) > 0 ? "OFF" : NULL(DT_STR, 30, 1252)

All I want to do is something like :



All I want to do is return a NULL value if my condition is false.



Your help would be appreciated.

View 3 Replies View Related

SQL Server 2012 :: Data Grouping On 2 Levels But Only Returning Conditional Data

May 7, 2014

I think I am definitely thrashing and am not getting anywhere on something I think should be pretty simple to accomplish: I need to pull the total amounts for compartments with different products which are under the same manifest and the same document number conditionally based on if the document types are "Starting" or "Ending" but the values come from the "Adjust" records.

So here is the DDL, sample data, and the ideal return rows

CREATE TABLE #InvLogData
(
Id BIGINT, --is actually an identity column
Manifest_Id BIGINT,
Doc_Num BIGINT,
Doc_Type CHAR(1), -- S = Starting, E = Ending, A = Adjust
Compart_Id TINYINT,

[Code] ....

I have tried a combination of the below statements but I keep coming back to not being able to actually grab the correct rows.

SELECT DISTINCT(column X)
FROM #InvLogData
GROUP BY X
HAVING COUNT(DISTINCT X) > 1

One further minor problem: I need to make this a set-based solution. This table grows by a couple hundred thousand rows a week, a co-worker suggested using a <shudder/> cursor to do the work but it would never be performant.

View 9 Replies View Related

Integration Services :: Oracle Procedure Is Not Returning Results When Executing From Script Task On SSIS

Jul 13, 2015

I'm executing Oracle procedure, which has three OUTPUT parameters and returns results in table type variable. i should not use ODBC, MSDAORA providers to call the procedure. So I'm planning to using Oracle OLEDB provider. I'm able to execute the procedure successfully, but when i do check (while dr.Read()) its not returning any records. But I know as per stored procedure results, it should return 66 records.

Dim conn As New OleDbConnection
Dim cmd As New OleDbCommand
Dim dr As OleDbDataReader
Dim QSQL As String

[code]...

View 10 Replies View Related

Sql Not Returning Any Data

Feb 20, 2007

Hello,
Im currently working on a asp.net file hosting wesite, and im being faced with some problems
I currently have 4 sql tables. DownloadTable, MusicTable, ImageTable and VideoTable. Each of those tables contain a UserName column, a fileSize column and sme other columns. What i want to do is add up all the values in the fileSize column, for each table, and then add them up with the tables, and return one value, and all this happens where the UserName column corresponds to the UserName of the currently logged on User.
I already have an sql statement that performs this exact thing. It is as follow
select TotalDownLoadSize = sum(DownloadSize) + (select sum(VideoSize) from VideoTable where ([UserName] = @UserName ) ) + (select sum(ImageSize) from Images where ([UserName] = @UserName) ) + (select sum(MusicSize) from MusicTable where ([UserName] = @UserName) ) from DownloadTable where ([UserName] = @UserName)
But the problem is that all of the tables have to have a value in there size columns for the corresponding user, for this sql statement to return something.
For example, lets say i logged in as jon. If, for the UserName jon, the sum of DownloadTable returned 200, the sum of VideoTable returned 300, the sum of MusicTable returned 100. The sql statement i stated above will return 4 instead of 600, if the sum of ImageTable returned zero.
Is there  way around this?
Im not sure if ive been cleared enough, please feel free to request more info as needed.
Thank you very much, and thx in advance.

View 5 Replies View Related

Most Efficient Way Of Returning Data

Feb 22, 2007

I have a number of tables, and I need to create a summary of the data.Now I have two choices. I could create a stored procedure that creates a temp table with the filters applied. This would require 12 selects for each year (we have 3 years of data so far). This means 36 selects so far that fill a temp table.The second choice is to create a table with the required columns and rows. As I am esspecially cross-joining 4 tables, the table would have about 10 x 10 x 12 x A rows, where A is a variable that will grow quickly. I can then keep this table up-to-date using triggers for each insert. Then all I need to do is use an aggregate funtion on the relevant filter.My question is, which is more efficient. Creating a stored procedure that creates the table dynamically, or have a table with thousands of rows and using an aggregate function on these.PS I am using SQL Server 2000Jag 

View 1 Replies View Related

Returning Column Name(s) That Contain Data

Jun 25, 2007

say i have some columns and a person can vote either once, twice or 3 times ( checkbox style control ) and in the database it looks something like this: eg:    ID.... vote1.....   vote2.... vote3           1         0             0            1          2         1             0            1for ID = 2, what type of query would i have to write to return the column names vote1 & vote3 ( vote2 is not null ) Cheers!!!  

View 1 Replies View Related

Query Not Returning Data!

Oct 21, 2007

Hi! I have a sql query in stored procedure: SELECT     Salutation + ' ' + FirstName + ' ' + LastName AS fullname
Ok, this returns a value if salutation is not null, but if the salutation is null it doesn't return any value, I was thinking if the saluation is null then I would atleast get the firstname and last name. Any help appreciated on this.

View 4 Replies View Related

READTEXT Not Returning All Data

Apr 12, 2004

SELECT @@TEXTSIZE
SET TEXTSIZE 4096
SELECT @@TEXTSIZE
GO
DECLARE @ptrval varbinary(16)
SELECT @ptrval = TEXTPTR(emailTemplates.Data)
FROM emailTemplates WHERE [Name] = 'AccountInfoReceipt1'
READTEXT emailTemplates.Data @ptrval 0 2000
GO


Thats my code. and it never returns the entire email template. why?

thx in adv

View 2 Replies View Related

Problem Returning Data

Apr 2, 2006

I have a stored procedure (in SQL Server 2005 Express) that returns a string.  The problem is when I call it from my web page I get only the first character of the string.  This is my SP:
ALTER PROCEDURE dbo.usp_CalcDeliveryCharge
@mintDistance int,
@mintCustomer_ID int = 0,
@mintRate int = 0 OUTPUT,
@mstrZone nchar(10) = null OUTPUT
AS

/* SET NOCOUNT ON */

SELECT @mintRate=RATE,
@mstrZone=ZONE
FROM tblRates
WHERE Customer_ID=@mintCustomer_ID
AND Mile_Range_Min <= @mintDistance
AND Mile_Range_Max >= @mintDistance
 
And this is my code:
sql_Command.CommandText = "usp_CalcDeliveryCharge"
sql_Command.CommandType = CommandType.StoredProcedure
sql_Command.Parameters.Clear()
sql_Command.Parameters.AddWithValue("@mintDistance", intApproxMiles)
sql_Command.Parameters.AddWithValue("@mintCustomer_ID", Profile.CompanyID)
sql_Conn.Open()
sql_Reader = sql_Command.ExecuteReader()
While (sql_Reader.Read())
Me.lblZone.Text = sql_Reader.Item(0).ToString
End While
sql_Conn.Close()
sql_Reader.Close()
sql_Command.Dispose()

View 1 Replies View Related

2 Querys Not Returning The Same Data

Apr 17, 2008

I have two databases with table structures exactly the same. The query in one database works and returns correctly. The same query (copied and pasted) in another database returns the correct records but completely ignores the order by. Even stranger, when you are creating the query under modify and run it, it is fine. But when I right-click on the query and go to 'Open View' then the query does not return correctly. Below is the query:

SELECT TOP (100) PERCENT pf.description AS incentive, CAST(i.targetc AS FLOAT) AS targetc, i.targetp, b.basis, d.description, i.iSelect, i.direction, pf.pValue,
pf.pFigure
FROM dbo.PerfFactorWeights AS pfw INNER JOIN
dbo.PerfFactors AS pf ON pfw.incentiveID = pf.incentiveID INNER JOIN
dbo.Incentive AS i ON pfw.incentiveID = i.incentiveID AND pfw.basis = i.basisID INNER JOIN
dbo.Basis AS b ON i.basisID = b.basisID INNER JOIN
dbo.Division AS d ON pfw.division = d.uniqueID
ORDER BY incentive, d.uniqueID, b.basis

View 4 Replies View Related

Query Not Returning Data

May 29, 2008

Hello everyone,

I set up a View in SQL Server 2005. The syntax checks ok, however, when I execute it, it doesn't return any data.
This is my Query:

SELECT DATEPART(hh, Time) AS Time, COUNT([Recipient-Address]) AS [CountOfRecipient-Address], ROUND(SUM([Total-bytes]) / 1048576, 2)
AS [SumOfTotal-Bytes]
FROM dbo.TrackingLog
WHERE (RIGHT([Recipient-Address], LEN([Recipient-Address]) - PATINDEX([Recipient-Address], '@')) IN
(SELECT Domains
FROM dbo.Domains))
GROUP BY DATEPART(hh, Time)


The part that I am most concerned about is the WHERE section. If I remove it, I get some data returned. If I don't, obviously I don't get anything back.

Any suggestion would be great.

Thanks

View 4 Replies View Related

Problem Returning SQL Data

Apr 9, 2007

I'm having trouble with the display of data when I test my asp page. I basically retrieves or pulls data from different tables in a database. Based on an ID number (which I can change manually by typing in a value and appending it to the URL), it shows GuestName, GuestDescription and URL as text link. I can get it to do that much. But for some reason it's not showing the URL associated with the Guest Name. I dont think it's the display section of my code. I think it's the Select statement.

Here is what the output looks like in my Firefox and IE browsers when I test. Some data has been changed to protect it's integrity:

(Name in bold) Mark Crisp's author of The Bush Lexicon. His new book...

Related Links:
John Doe interviewed by Susan Smith, 123 News

What it should say in the link is this: Mark Crisp's blog (as text link)

When I test for different data I just change the end of the URL like this:
defaultprogram4.asp?ID=1234 (this number represents an ID column in a table)




Code Snippet

<%
set con = Server.CreateObject("ADODB.Connection")
con.Open "File Name=E:webserviceCompanyCompany.UDL"
set rs = Server.CreateObject("ADODB.Recordset")

id=request.querystring("id") 'If this line is commented out the page will be blank.
'However you can still append a record number to the end of the URL and display that one.

IF id <> "" then id=id else id="1234" end if 'This line shows the default record of 1234. If this line is commented out the page will ONLY show the default record but will NOT allow you
'to append a different number

strSQL = "SELECT *, T_Programs.ID AS Expr1, T_ProgramGuests.ProgramID AS Expr2, T_ProgramGuests.GuestName AS Expr3, T_ProgramGuests.GuestDescription AS Expr4, T_ProgramLinks.URL AS Expr5, T_ProgramLinks.Description AS Expr6 FROM T_ProgramGuests CROSS JOIN T_Programs CROSS JOIN T_ProgramLinks WHERE (T_ProgramGuests.ProgramID = '" & id & "')"

rs.Open strSQL,con 'open a connection to the database

%>

<br />
<strong><% Response.Write RS ("GuestName") %> </strong> <% Response.Write RS("GuestDescription") %><br /><br />
Related Links:<br />
<li class='basic'><A HREF="<%= RS("URL") %>"><%= RS("Description") %></A></li>


<!-- END OF THE GUESTS AND LINKS SECTION -->

<%
recProgram.Close
con.Close
set recProgram = nothing
set con = nothing
%>


Bottom line here is this: Why would I be seeing one name but a link not associated with that name? It's as though it's reading a name from the ProgramGuests table and a URL from the
ProgramLinks table (Except that: it shows a completely different unrelated URL to that name).

What am I missing?

View 1 Replies View Related

Store Procedure For Returning Data

Apr 19, 2006

i want to return certain number of columns frm table using store procedure .and i hav to load those returned data into text boxes which i created in asp.net page.is there a way

View 2 Replies View Related

4 Part Name Join Returning Too Much Data

Jan 12, 2008

Hello,

I recently created a linked server to db2. When I do a join on the linked server it is returning to much data.
select * from table1 left join [linkedServer]..Schema.Table as tb1 on table1.id=tb1.id

For now, I had to first get the ids I wanted from table1 and then use a subquery to join table1 on the a result set produced from a query to the linked server that only specified those ids. Below is an example

select * from table1 left join (select col1 from [linkedServer]..Schema.table where id=1 or id=2) as tb1 on table1.id=tb1.id

I'm guessing I have some setting wrong. One of the biggest reasons for me to use the four part name is so I can do joins like the first example.

Please let me know if you have any ideas.

Thanks

View 4 Replies View Related

My Report Not Returning Data For Only One Field

Jan 18, 2008

Hi all,


I have a simple query like this:


SELECT crop, ItemNo, LotNo, Site, Process, IntID, ObsDetail, ObsValue,

(CASE WHEN (rtrim(crop) = '010' OR
rtrim(crop) = '010W' OR
rtrim(crop) = '019' OR
rtrim(crop) = '019W' OR
rtrim(crop) = '018') THEN 'CORN' WHEN (rtrim(crop) = '0150' OR
rtrim(crop) = '0159' OR
rtrim(crop) = '0150W' OR
rtrim(crop) = '159W' OR
rtrim(crop) = '158') THEN 'RICE' ELSE '' END) AS Product, TestStartDate, TestEndDate, ObsString
FROM V_LAB
WHERE (LotNo >= @lotStart) AND (LotNo <= @lotEnd)

If I run this query and filled the lotStart and lotEnd parameter with: G0424MK
Then, below's the data returned. (I run the query in management studio)






010W

30A97-CLN-UNT-BULK

G0424MK

IDPMLG01

AFTER CLEANER

4982

PRCT MOIST

10.35

CORN

NULL


010W

30A97-CLN-UNT-BULK

G0424MK

IDPMLG01

AFTER CLEANER

4982

PRCT GOOD

97.5

CORN

NULL


010W

30A97-CLN-UNT-BULK

G0424MK

IDPMLG01

AFTER CLEANER

4982

PRCENTMEAN

97.75

CORN

NULL

I'd only going to retrive 3 data that i'd like to show on the report:
1. Moisture Content, with formula:
=IIf(RTRIM(Fields!ObsDetail.Value) = "PRCT MOIST", Fields!ObsValue.Value, cdec(0.00))
the ObsValue value after i run on the report preview with LotStart and LotEnd G0424MK is: 10.35 (this is correct)

<!--[if !supportLists]-->2. Physical Damage, with formula:
=Iif(rtrim(Fields!ObsDetail.Value) = "PRCT GOOD", Fields!ObsValue.Value, cdec(0.00))
the ObsValue value after i run on the report preview with LotStart and LotEnd G0424MK sebesar: 97.50 (this is correct)

<!--[if !supportLists]-->3. Warm Test, with formula:
=Iif(rtrim(Fields!ObsDetail.Value) = "PRCENTMEAN", Fields!ObsValue.Value, cdec(0.00))

the ObsValue value after i run on the report preview with LotStart and LotEnd G0424MK sebesar: 0.00 (this is wrong) because it should be shown 97.75



anybody knows which part i made my mistake?



Thanks!
Addin

View 6 Replies View Related

SQL Stored Proc Not Returning Any Data In The Web Page

Feb 26, 2007

Hi
I have coded the simple login page in vb .net  which calls the stored proc to verify whether the user login details exists in the database.  The stored procudure returns data back when I execute it in the SQL SERVER Management studio. But when I  execute the stored proc in the 'Run stored Proc' wizard' , it is not retuning any data back. Connection string works fine as another SQL select command returns data in the same page.. I have included the VB code . Please help me to sort out this problem.Thank you.
 
If Not ((txtuser.Text = "") Or (txtpassword.Text = "")) Then
 
 
Dim conn As New SqlConnection()
conn.ConnectionString = Session("constr")
conn.Open()
 
Dim cmd As New SqlCommand("dbo.CheckLogin", conn)
cmd.CommandType = CommandType.StoredProcedure
' Create a SqlParameter for each parameter in the stored procedure.
Dim usernameParam As New SqlParameter("@userName", SqlDbType.VarChar, 10)
usernameParam.Value = Trim(txtuser.Text)
 
Dim pswdParam As New SqlParameter("@password", SqlDbType.NVarChar, 10)
pswdParam.Value = Trim(txtpassword.Text)
 
Dim useridParam As New SqlParameter("@userid", SqlDbType.NChar, 5)
Dim usercodeParam As New SqlParameter("@usercode", SqlDbType.VarChar, 10)
Dim levelParam As New SqlParameter("@levelname", SqlDbType.VarChar, 50)
 
'IMPORTANT - must set Direction as Output
useridParam.Direction = ParameterDirection.Output
usercodeParam.Direction = ParameterDirection.Output
levelParam.Direction = ParameterDirection.Output
 
'Finally, add the parameter to the Command's Parameters collection
cmd.Parameters.Add(usernameParam)
cmd.Parameters.Add(pswdParam)
cmd.Parameters.Add(useridParam)
cmd.Parameters.Add(usercodeParam)
cmd.Parameters.Add(levelParam)
 
Dim reader1 As SqlDataReader
Try
If conn.State = ConnectionState.Closed Then
conn.Open()
End If
Try
reader1 = cmd.ExecuteReader
Using reader1
 
If reader1.Read Then
Response.Write(CStr(reader1.Read))
Session("userid") = reader1.GetValue(0)
Session("usercode") = CStr(usercodeParam.Value)
Session("level") = CStr(levelParam.Value)
Server.Transfer("home.aspx")
Else
ErrorLbl.Text = "Inavlid Login. Please Try logging again" & Session("userid") & Session("usercode") & Session("level")
End If
End Using
Catch ex As InvalidOperationException
ErrorLbl.Text = ex.ToString()
End Try
Finally
If conn.State <> ConnectionState.Closed Then
conn.Close()
End If
 
End Try
 
Else
ErrorLbl.Text = "Please enter you username and password"
 
 
 
End If
 

View 5 Replies View Related

Query Analyzer Returning Messed Up Data

Jul 23, 2005

I am using SQL7 Query Analyzer. A simple select * from myMLSview andthen I save results as a .csv file has the commas messed up in quite afew places. The data is messed up before I save it to the .csv file. Sothere are blank spaces being added here and there causing them to readas 'add comma' when saving to .csv format. Even the column data ismessed up... example: ,photo_mod_time,photo_mo,d_date, should read,photo_mod_time,photo_mod_date,I have a view on a remote MS-SQL7 Server, the view has about 200columns and the data returned from the my querys can be from 10 to 25MBin size. Connection is via Roadrunner/cable. Should I use anothermethod, maybe command line? Any suggestions?

View 3 Replies View Related

Stored Procedure - Returning Data Using Parameters

Feb 12, 2008

Hello,

I am trying to get records related to a Device_ID with the following conditions:

IF LastModified_Date BETWEEN (@p_datetime_StartDate AND @p_datetime_EndDate) OUTPUT
ELSE OUTPUT ALL.

I want records between the range of date selected, or all the records if no date entered. Can somebody help me ASAP. Here is what I have so far. I just don't know where to put the IF...THEN ELSE.

SELECT Device_ID,
Action,
Username,
LastModified_Date,
FROM ActivityMonitorActionLogs
WHERE Device_ID = ISNULL (@p_int_Device_ID, AL.Device_ID)
AND LastModified_Date BETWEEN (@p_datetime_StartDate AND @p_datetime_EndDate)


Thanks a lot!!!
Mylene

View 3 Replies View Related

Error Returning OLAP Data In RS 2005

Mar 28, 2006

I have a .rdl file that was exported out of ProClarity's Desktop Professional 6.1 using their RS plug-in. I uploaded the file into Report Manager and when I execute it, I get the following error:


An error has occurred during report processing.


Query execution failed for data set 'Three_Month_Funding_Trend'.
Unable to recognize the requested property ID 'ReturnCellProperties'.











Does anyone have any idea what this is referring to? Does it have something to do with my configuration, connection or the report definition? Other reports such as DBMS based reports work fine.



Thanks for your assistance

View 11 Replies View Related

Stored Procedure Returning An Empty Data Table

Nov 20, 2007

I've built a simple VS2005 ASP.Net web app that uses Crystal Reports for generating assorted reports.  More specifically, when a report is called it executes the correct SQL Server Stored Procedure and returns a Data Table populated with with appropriate data.  In my testing, everything seemed to be working fine.But I just did a test where I pressed the "Submit" button on two different client browsers at almost the same time.  Without fail, one browser returns the report as it should but the other one returns an empty report; all of the Crystal Reports template info is there but the report is just empty of data.  Considering that each browser is running in its own session, I'm confused about why this is happening.One thing: I did login as the same user in both cases.  Might this be causing the problem?Robert W.Vancouver, BC 

View 7 Replies View Related

SELECT * View Returning Wrong Column Data

Oct 16, 2007

SQL 2005 9.00.3402.00 (x64) As Above really when I select * OR select a single column from the view the wrong column data is returned. in SQL Management Studio when I expand the Columns of the view it reflects the old table structure not the new table structure. I can easily fix by compiling the view again but this would mean I would have to recompile all referencing views when I make a change to table structures. I've tried various DBCC Clean Buffers & drop cache with no effect. Is there a command to recompile all views & poss stored procs in a database. Any help or explanation would be appreciated GW

View 12 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved