Showing posts with label retreive. Show all posts
Showing posts with label retreive. Show all posts

Thursday, March 22, 2012

DropDown List values

For a controlParameter in the ASP code, how do I retreive the selectedValue of the drop down list?
Would this work?

<asp:controlParameterName="InvoiceNumber"Type="String"ControlID="ddAdSize.Value"/>

Hi

I 'm a beginner at this, but I solved what I think is the same problem as you have, by looking athttp://authors.aspalliance.com/aspxtreme/.
There you will find solutions to many problems.
This is part of my html code:
<Asp:DropDownList Id="ddlCarrier" TabIndex="17" onSelectedIndexChanged="ShowCarrier" Width="150" autopostback runat="server">
</Asp:DropDownList>
And part of the ASP.NET code:
Dim Selection1 As String = _
"SELECT Carrier, Used, Manufacturer, Material, ManufacturedDate " & _
"FROM Carriers " & _
"WHERE Carrier = '" & ddlCarrier.SelectedItem.Text & "'"
Hope this will help you
Rolf Dahlstr?m

Friday, February 24, 2012

DrillThrough to Details.... Programming

Hello,

In the article on microsoft : http://msdn2.microsoft.com/en-us/library/aa175980(SQL.80).aspx

It explains how to use ADOMD and ADODB to retreive detailed information for the cell returned from the analysis service. For example, detailed information (such as student ID, First name, last name.., etc) about the student that's in location Cincinnati.

However, this example is quite old and doesn't apply to the new ADOMD.net (Microsoft.AnalysisServices.ADOMDClient). I tried to find any example on the web, but without success.

Is there a way to retrieve underlying detailed information?

Any help is greatly appreciated. Thank you very much,

Annie

Finally, I found some resources online and wrote the following code. It worked for me.

Dim AS_Conn As New ADOMDConnection(ConfigurationManager.AppSettings("OLAPConnection2005"))

AS_Conn.Open()

Dim AS_Comm As New AdomdCommand

Dim dt As new DataTable

Dim dr As DataRow

Dim dc As DataColumn

AS_Comm = AS_Conn.CreateCommand()

AS_Comm.CommandText = strMDX

Using rsDetails As AdomdDataReader = AS_Comm.ExecuteReader()

For intFieldCount As Integer = 0 To rsDetails.FieldCount - 1

dc = New DataColumn(rsDetails.GetName(intFieldCount))

dt.Columns.Add(dc)

Next

While rsDetails.Read

dr = dt.NewRow

For intFieldCount As Integer = 0 To rsDetails.FieldCount - 1

If NOT rsDetails.Item(intFieldCount) Is Nothing AndAlso TRIM(rsDetails.Item(intFieldCount)).Length > 0 Then

dr(intFieldCount) = rsDetails.Item(intFieldCount).ToString()

Else

dr(intFieldCount) = ""

End If

Next

dt.Rows.Add(dr)

End While

End Using

AS_Conn = nothing