Accessing ADOMD Data Via A Web Service

May 19, 2008



Is there a way to access cubes via a web service?

Are there any built in web services for doing this in SSAS?

Do I have to have the ADOMD client installed before I can access or use data if it were possible to access it via a web service?

View 1 Replies


ADVERTISEMENT

Accessing A Web Service Using Clr In SQL 2005

Aug 13, 2007

I need to access a billing webservice from SQL. I createde a new c# class project and made a web refrence to the web service "ProdBilling".

Here is the code of my assembly

using System.Data;
using Microsoft.SqlServer.Server;
using System.Data.SqlTypes;
namespace PaymentProc
{
public class PaymentProc
{
[Microsoft.SqlServer.Server.SqlProcedure]
public static void ChargeCard(int account, int amount)
{
string Response;
ProdBilling.Service serv = new ProdBilling.Service();
Response = serv.ChargeCard(account, amount);
SqlContext.Pipe.Send(Response);
}
}
}

I then ran WSDL

wsdl /oaymentProc.cs /naymentProc http://ProdWeb1/PaymentProc/PaymentProc.asmx

Then compliled

csc /target:library PaymentProc.cs

and added the assembly
CREATE ASSEMBLY PaymentProc from 'D:ProdCodePaymentProc.dll' WITH
PERMISSION_SET = UNSAFE


I cannot figure out how to refrence the chargecard method

I have tried

CREATE PROCEDURE PaymentProc
@Account int,
@Amount int
AS
EXTERNAL NAME PaymentProc.[PaymentProc.PaymentProc].ChargeCard

It seems wsdl.exe put all this serialization code

namespace PaymentProc {
using System.Diagnostics;
using System.Web.Services;
using System.ComponentModel;
using System.Web.Services.Protocols;
using System;
using System.Xml.Serialization;


///
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="ServiceSoap", Namespace="http://ProdWeb1/PaymentProc")]
public partial class PaymentProc : System.Web.Services.Protocols.SoapHttpClientProtocol {

private System.Threading.SendOrPostCallback ChargeCardOperationCompleted;

///
public PaymentProc()
{
this.Url = "http://ProdWeb1/PaymentProc/PaymentProc.asmx";
}

///
public event ChargeCardCompletedEventHandler ChargeCardCompleted;

///
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://ProdWeb1/PaymentProc/ChargeCard", RequestNamespace="http://ProdWeb1/PaymentProc", ResponseNamespace="http://ProdWeb1/PaymentProc", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public string ChargeCard(int account, int amount) {
object[] results = this.Invoke("ChargeCard", new object[] {
account,
amount});
return ((string)(results[0]));
}
.................

When I run

CREATE PROCEDURE PaymentProc
@Account int,
@Amount int
AS
EXTERNAL NAME PaymentProc.[PaymentProc.PaymentProc].ChargeCard


I get error


Method, property or field 'ChargeCard' of class 'PaymentProc.PaymentProc' in assembly 'PaymentProc' is not static.

Any ideas? This seemsed so straitforward in the beginning.

View 2 Replies View Related

How To Avoid Athentication Prompt When Accessing A Report Through URL Access Using Web Service

Nov 23, 2007

Hi,

I am accessing my reports through one aspx page designed by me.
in that i am using webservice to render the report and
linking the url of the report to reportviewer

it is working fine
but for the first time it is asking username & password of the reporting server to render the report.
i am using Reporting Services 2000
plz help to avoid this user name & password prompt.

View 7 Replies View Related

Amo And Adomd

Jan 6, 2008

how can i use amo references and adomd references to gether in one project for connecting and showing model

View 5 Replies View Related

Problem In Accessing Reporting Services Web Service, Unable To Set Credentials I Guess....

Feb 28, 2007

  I am trying to access the Reporting Services Web Service, but i m not able to make it work. i tried with default credentials and network credentials

ReportingService service = new ReportingService();

service.Credentials = new System.Net.NetworkCredential("username", "password", "domain");

service.CreateSubscription(report, extSettings, description, eventType, matchData, parameters);

This is the exception i getThe current action cannot be completed because the user data source credentials that are required to execute this report are not stored in the report server database. ---> The current action cannot be completed because the user data source credentials that are required to execute this report are not stored in the report server database.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.Services.Protocols.SoapException: The current action cannot be completed because the user data source credentials that are required to execute this report are not stored in the report server database. ---> The current action cannot be completed because the user data source credentials that are required to execute this report are not stored in the report server database.

Source Error:





Line 3382: [return: System.Xml.Serialization.XmlElementAttribute("SubscriptionID")]
Line 3383: public string CreateSubscription(string Report, ExtensionSettings ExtensionSettings, string Description, string EventType, string MatchData, ParameterValue[] Parameters) {
Line 3384: object[] results = this.Invoke("CreateSubscription", new object[] {
Line 3385: Report,
Line 3386: ExtensionSettings,

View 5 Replies View Related

ADOMD.NET : Dynamic Parameters

Mar 27, 2007

Logically speaking, the two cases below should behave the same. However case 2's output is wrong. Perhaps someone knows what's wrong in case 2.



Case 1:
-------------
AdomdCommand cmd = new AdomdCommand();
conn.Open();
cmd.Connection = conn;
cmd.CommandText = "SELECT Cluster(), PredictCaseLikelihood()" +
" FROM [Data Validation]" +
" NATURAL PREDICTION JOIN" +
" (SELECT " +
" (SELECT @var0 as [var] " +
" UNION SELECT @var1 as [var] " +
" UNION SELECT @var2 as [var]) AS [vartable]) AS t";





Case 2
-------------
AdomdCommand cmd = new AdomdCommand();
conn.Open();
cmd.Connection = conn;
cmd.CommandText = "SELECT Cluster(), PredictCaseLikelihood()" +
" FROM [Data Validation]" +
" NATURAL PREDICTION JOIN" +
" (SELECT " +
" (SELECT @var0 as [var] ";
for(int i=1; i<3; i++)
{
cmd.CommandText = cmd.CommandText +
"UNION SELECT @var" + i.ToString() + " as [var] ";
}
cmd.CommandText = cmd.CommandText + ") AS [vartable]) AS t";



Mary

View 4 Replies View Related

Using ADOMD.NET Set Object In Stored Procedures.

Mar 18, 2008

Hallo everyone,
I have a problem passing the [Set] object to a stored procedure that we use in a calculation of our Cube. Following Mosha Pasumansky indications in http://www.sqljunkies.com/WebLog/mosha/archive/2007/04/19/stored_procs_best_practices.aspx I avoided to use Tuples.count and Tuples[Index] but stll receive an €œInternal Error: An unexpected exception Occurred€?.
The error arrives randomly (sometimes the sproc works perfectly, like its €œsister€?, that we were forced to implement with arrays and strings, using the old SetToArray and SetToString mdx functions).
Our particularity is that our program is in Vb.Net. and here is the incriminated cycle:

Public Function Redditivita2(ByVal flusso0 As Double, ByVal setRateAMesi As [Set], ByVal fin_sca_map As Double) As Double

...
Dim tp As Tuple
Dim ntp As Long
ntp = 0
i = 0
For Each tp In setRateAMesi
If ntp Mod 2 = 0 Then
numAggr = CLng(tp.Members(0).Name)
mesi(i) = numAggr Mod 1000
proroga(i) = Int(numAggr / 1000)
If (mesi(i) > 120 Or proroga(i) > 120) Then
Err.Raise(vbObjectError + mnTroppeRate, , "Rateazioni a più di 120 mesi di durata o di proroga non previste - contattare Mappamondo Informatica s.r.l. se richieste")
End If
nrateamesi(i) = MDXValue.FromTuple(tp).ToDouble
Else
nmaxrateamesi(i) = MDXValue.FromTuple(tp).ToDouble
i = i + 1
End If
ntp = ntp + 1
Next

The set contains a cross join between a dimension and two measures (in the calculation we have: OLAPExtFunctionOpt!Redditivita2([Measures].[FLUSSO_0],NonEmpty(CROSSJOIN(.children, {[Measures].[RATA], [Measures].[RATA_MAXI]})),[Measures].[SCARTO_PES_GG])).

I installed SP2 and Cumulative HotFix. 3152. Does anybody has any idea? Has the problem any connection with msmgsdrv versions? Thank you very much for attention!

View 1 Replies View Related

Sample For ADOMD.NET Server Programming

Aug 24, 2006

Hi all,

Can I get Samples for ADOMD.Net Server Programming



Thanks,

View 1 Replies View Related

Is It Possible To Write Clr Stored Procedure With Out Using Adomd Server.

Dec 5, 2006

hi,

I need to write a clr stored prodeure.i have to call that stored procedure from my prediction query.My Application is going to make use of that query to get the prediction output.

Is it possible to write clr stored procedure with out using adomd server.How?

For example:

In My Assembly i am having a function PredictPerformance(),Which is having my DMX Query.I need to execute that function from my analysis service by calling like this,

select aly. PredictPerformance() FROM [Model].

how to do this?

View 1 Replies View Related

Problem With Nested DataTable In Server-side ADOMD.NET SP

Jan 7, 2008

Hi, I have a server-side stored procedure that I created in C#. The SP issues one DMX statement (within the implicit connection) which has a prediction join with SHAPE/APPEND. It then tries to map the results of the AdomdDataReaders to System.Data.DataTable objects, returning one System.Data.DataTable object. Because of the SHAPE/APPEND, I end up with two nested AdomdDataReaders.




Code Block

using Microsoft.AnalysisServices.AdomdServer;

using System.Data;


...


public DataTable VivaOMengoSP()
{
AdomdCommand c = new AdomdCommand(CreatePredictedDMX());


// select ... prediction join ... shape ... append



DataTable dt = new DataTable();
dt.Columns.Add("att1", typeof(string));
dt.Columns.Add("att2", typeof(int));
dt.Columns.Add("predictednestedmonster", typeof(DataTable));

object[] row = new object[3];
try
{
AdomdDataReader dr = c.ExecuteReader();
while (dr.Read())
{
DataTable innerdt = new DataTable();
innerdt.Columns.Add("inneratt1", typeof(int));
innerdt.Columns.Add("inneratt2", typeof(string));

row[0] = dr[0];
row[1] = dr[1];
AdomdDataReader innerdr = (AdomdDataReader)dr[2];
object[] innerrow = new object[2];
while (innerdr.Read())
{
innerrow[0] = innerdr[0];
innerrow[1] = innerdr[1];
innerdt.Rows.Add(innerrow);
}
row[2] = innerdt;
dt.Rows.Add(row);
}
dr.Close();
return dt;
}
catch
{
return null;
}
}
(The code is a modification to listing 20-3, page 807, of the book "Programming Microsoft SQL Server 2005" by Brust & Forte)

I call it directly in SSMS and I get this result:

Executing the query ...
Execution of the managed stored procedure VivaOMengoSP failed with the following error: Microsoft::AnalysisServices::AdomdServer::AdomdException.
Errors in the high-level relational engine. The System.Data.DataTable type is not supported by Analysis Services code name "Katmai".

Execution complete

Is it possible to have nested table as a SP result? Is DataTable the appropriate class?

Thanks,
Gustavo Frederico

View 4 Replies View Related

I Am Accessing Data Using Data Access Pages In IIS 7 To SQL Server 2005 Authentication Is Failing

Feb 5, 2007

is there a step by step paper to get there? here is what i need to consider. I Iwill have many customers that will need their own set of records and access pages "branded for their company" each customer will have many clients. I am hosting this application on a windows 2003 server with SQL 2005 server enterprise.

I am using windows authentication, I have created a username in windows, then i added the windows user in SQL management studio in security, granted "DB Read" and "DB write" and again under the database security tab. still from the web authentication fails. i must be nissing a step or two?

I expect to set up a username for each database as i setup new customers.

View 1 Replies View Related

Data Access :: Users Get Wrong Data Records - Cross Coupling When Accessing Files From MVC App

Aug 7, 2015

I have an MVC asp.net application that stores many records in a table on sql server, in its own system.  used the system for 2 months, worked fine accessing, changing data.

Now that other users are logging in? there is cross coupling going on.  one user gets the data from another users sql search.

In the mvc app it had used the get async method to read the ID record from the db, i set that to synchronous.  no effect;  the user makes their own login id but that does nt matter either.

View 8 Replies View Related

Accessing Data In A Column

Oct 18, 2006

I have a SQLDataSource returning data for a formview.  This should be a simple question that I cannot find an answer to.  The SQLDataSource is returning only one row of data.  How do I access the value of one of the columns?Thanks for the information.

View 3 Replies View Related

Accessing Data In Different Database

Jan 22, 2007

Hello Everyone,
  Is it possible to write a query that can access data in differnt database so I have "trainee" and "training" databases. In want to access one training  table in trainee database through a query. How can I  do this.
 
Thanks.

View 1 Replies View Related

Code For Accessing Data

Jan 3, 2008

Does anyone have code to access data? I want to create a sqldatasource control on the page, but would like to programmatically/manually/code-behind-wise to fill in my queries and their parameters. Thanks! 

View 6 Replies View Related

Accessing Data From The SQLDataSource.

Apr 5, 2008

I am using a drap and drop SQLDataSource control.  Everything works like I am wanting it to, but I want to check a value from one of the fields that I have retrieved.  I am lost as how to retreive just the field.  If I have to create another dataset to do the work what is the point of using the drag and drop control?  I would really like to just access the dataset fields as needed.

View 2 Replies View Related

Accessing Data In One Field

Jun 20, 2008

There has to be a better way (less code) to grab the data in one field than:string sql0 = "Select PSI from agentRate where agent='" + agent + "'";
SqlCommand command0 = new SqlCommand(sql0, conn2);SqlDataReader dr0 = command0.ExecuteReader();
string PSI="";while (dr0.Read())
{PSI = (string)dr0["PSI"];
}
dr0.Close();
 
Any Thoughts?

View 4 Replies View Related

About Accessing Data From Sqlserver

Sep 15, 2005

Hello sir,I have installed .net1.1version on windows2003 operating system.I have also installed sqlserver2000  on the same system.My problem is that when i am trying to get data from sqlserver from asp.net program i am getting error as 'access denied to user NT AUTHORITY/NETWORK USER'.I request you to kindly suggest me with an appropriate solution.Thanking you.Please email me on:-aanandkumar786@yahoo.com

View 1 Replies View Related

Accessing Data Across 6.5 Servers

Jun 22, 1999

Hi,

I need to access data across my sql servers . All the servers are 6.5. Think MS DTC is the solution. But how to implement the same. Can somebody give me step by step instructions.

Thanks in Advance.

Cheers

View 1 Replies View Related

Oracle Accessing Data

Oct 22, 2001

There is any tools or products that allow Oracle Users to access SQL 2000 data in realtime? I know how to go in the opposite direction using linked servers, but am not sure on this direction,

Thanks
David

View 1 Replies View Related

Accessing AS400 Data

Jun 17, 2005

I've been trying to use the integrations services to access AS400 data with almost no success.   Any suggestions or help you can give me would be appreciated.  Some of the issues I can't make sense of are the following.

View 11 Replies View Related

Accessing Different Languages Data

Jan 24, 2008



Hi,

My source is Excel and one column has data in different languages. But when i try loading it to my Database errant data gets loaded.
I tried loading data to Flat file with no success.

Thanks in advance.

View 1 Replies View Related

Accessing Data Directly From A SqlDataSource?

Mar 7, 2007

First let me give you a little back ground on me.  I'm very new to the ASP, ASP.NET, Visual Studio, Sql Server, Frameworks....thing.  I am coming over from a PHP/MySql background of over 5 years.  The change over to VBScript and VB has been to tough and I have a basic liking for the Visual Studio 2005 and the ease of putting things together.  However, I have come across something that to me seems like it should be relatively simple, but haven't been able to find the documentation or samples to describe what I'm looking to do.
Rough Need:
1.  Start with a form will a couple labels and a singe textbox to get the lookup date from an user.
2.  Query one table/view based on the users choice of date and select only one field of returned data.(Doing this by itself is not a problem and I can display my results in a Gridview, but this is where it starts getting tricky and the gridviews won't work for me.)
3.  If there is something returned, I need to start a HTML table layout or possibly some form of a Gridview(I don't see how I would use the Gridview) and start a loop, adding the first returned row from this query into the first cell.
4.  Now, based on that same User Date and the returned row value from the previous query, I need to query another Table/view and return another single field, which might return 1 or multiple rows, which I need to start a loop to display unique items in cells under the first on above.
5.  Based on the original User Date and each returned row from the first query, I need to query two other Table/views and get some additional information.  4-5 fields will be returned and be displayed on one row in the number of necessary columns.
6.  This would finish the first row from the first query, so I would need to loop back up to see if there were any further results and continue looping until the get to the last of the results from the first query.
7.  Finally, I would just need to close up the Table/gridview.
The basic results I'm looking for would be similar to the following:
Results for 10/11/2005



Field name 1
Field name 2
Field name 3
Field name 4
Field name 5



First Result from query 11 of 4 results from Query 2, but only 1 unique result

Info from Query 3

Info from Query 3
Info from Query 3
Info from Query 4
Info from Query 4

Info from Query 3
Info from Query 3.
Info from Query 3
Info from Query 4
Info from Query 4

Info from Query 3

Info from Query 3   
 
Info from Query 3
Info from Query 4
Info from Query 4

Info from Query 3
Info from Query 3
Info from Query 3
Info from Query 4
Info from Query 4



Second Result from query 1First result from Query 2 after looping though the first query Second result from Query 2 after looping though the first query

Info from Query 3

Info from Query 3
Info from Query 3
Info from Query 4
Info from Query 4

Info from Query 3
Info from Query 3.
Info from Query 3
Info from Query 4
Info from Query 4

Info from Query 3

Info from Query 3   
 
Info from Query 3
Info from Query 4
Info from Query 4

Info from Query 3
Info from Query 3
Info from Query 3
Info from Query 4
Info from Query 4
It seems me from what I have read and slowly figuring out, is that I should be able to directly access the DataSet returned by four SqlDataSources, one for each of the above querys and then just write my own VB to handle the necessary looping, table format and such.  I can easily add the for SqlDataSources to the page and add a Gridview for each one and get 4 separate chunks of info, but can't see a way with GridViews to intermingle the info like displayed above.
So, if it can be done with Gridviews, then I would love to see how that is done.  But, if someone could explain to me how I access the DataSets directly that I get from the 4 SqlDataSources, then that would be ok too.  I have figured enough out with VB, that I can write the code to do my looping requirements, if I can just access the information I get back.  Thanks for reading all the way through this long post.
 Jack 

View 1 Replies View Related

SQLDATASOURCE ~ ACCESSING DATA PROGRAMATICALLY

May 9, 2007

Can anyone point me in the direction of code that will allow me to acce3ss the data held in an SQLDataSource.
 
The Control is link Selection Staement has been set at run, what I want to do is loop thru any data that is rertrieved, setting oter controls on the page depending on values
 Thanks
 Steve (I have not got much hair left, please help soon)

View 3 Replies View Related

Accessing SQL Server Data Using Thread

Sep 17, 2007

Hi,
How do we set credentials or contex to a thread.
I create a new thread and within that thread if I am use a connetion string with Integrated Security=True" to talk to the SQL Server, however it seems that the new thread's context/identity is blank and hence failing the SQL Server connection.
Please help.
Thanks
 
 

View 2 Replies View Related

Accessing Database Data In ASP.NET 2.0 - Best Practices?

Dec 31, 2007

I was wondering if you guys know of a good site that talks about programmatically accessing and displaying data from a sql server 05 database in ASP.NET 2.0.I want to have a data adapter in a dataset, but I would like to create my own class file and pull the data from the adapter through code into the class. Is this the best way? Im wondering about the best practices while learning this new technology. Any articles provided would be appreciated. Thanks!

View 2 Replies View Related

Accessing Data Structure Of A MS SQL Database

Mar 19, 2008

I have written 5 content-management systems and am getting a little bored writing a lot of the same functionality and tweaking it for different datamodels.  Is there a way within .NET to have visibility of a database's structure (ie, data type, column names, foreign keys etc)?  I'd like to write up a dynamically generated form for any given table, displaying appropriate form controls based on data type and foreign keys.

View 7 Replies View Related

Accessing Sql Server Data From Unix

Apr 5, 2001

Hello !

I am owrking in java developmenton solaris using weblogic6.0
Does any body know how to access sql server data from solaris.
If some body knows that, can you please post me the steps
that i need to do it.

Thanks
Veena

View 3 Replies View Related

Problem In Accessing Remote Data?

Jun 26, 2000

hi,

I am trying to access data from a remote database which is on SQL SERVER from my local SQL SERVER.. the below is my query..

select * from Remote_server.Remote_DB.dbo.RemoteTable

When i execute this query...

I get a error message..

Server: Msg 7411, Level 16, State 1, Line 1
Server 'remote_server' is not configured for DATA ACCESS.

I added my local server in the remote server as linked server

can anyone tell me the sol...

thanks

View 1 Replies View Related

Accessing Data From VB6 - Query Builder&#39;s

Jan 7, 1999

We have SQL Server 6.5 with an Access 8.0 front-end. We are about to re-write our front-end in VB6 using RDO. Obviously Access has a nice fast and easy to use query builder. My question therefore is - is there any such query builder that can be used within VB6 to simplify query writing ? Or do I have to write all query's and and stored procedures using straight SQL and/or stored procedures. I do not want to use Visdata as it doesn't appear up to the task.

Thankyou whoever helps

Paul

View 1 Replies View Related

Accessing External Data From SQL Server

Mar 21, 2007

Hi,I have a Sybase dataserver containing lots of (huge) tables that Iwould like to access from SQL Server (two different applications,using two different datasources, now want to talk to each other). MSAccess has a feature for 'linking' external data. Can I do similarstuff in SQL Server?Basically, I am trying to avoid having to duplicate the data in boththe dataservers and worry about keeping them in sync.Regards,Tanveer

View 3 Replies View Related

Accessing Shared Data Source In VS.net

Aug 10, 2007



How can i get the shared data sources i created in the report manager to be available in VS.net to be able to assign to a report. I want to be able to create the shared data source first in Report manager and then be able to assign it a report in VS.Net



Thanks.

View 4 Replies View Related

Error Accessing SAP Via SAP Data Provider

Oct 17, 2007



Hi,

I am trying to do this select over a SAP table:

select * from KNA1

But in DataReader component raises an error pointing that Z_EXTRACT_DATA_FULL function module can't be found.


Anyone know where is the problem??

Thanks!

View 5 Replies View Related







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