.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

How to Access MsiEnumRelatedProducts Return Values?

Posted By:      Posted Date: October 13, 2010    Points: 0   Category :WPF

I am using the MsiEnumRelatedProducts function and according to all the articles I should be getting text return values such as:


But I am only getting numbers returned from the function. I assume I need to use some Enum but I cannot find any example anywhere. I have looked at this article:


But there is no explanation of how to actually get those text return values back?

View Complete Post

More Related Resource Links

Return of the Rich Client: Code Access Security and Distribution Features in .NET Enhance Client-Sid


Rich clients employ many of the features and conveniences of the operating system they run on, and the list of these features has been growing since the dawn of the PC. But as apps have migrated to the Web, the trend towards increasing client-side functionality has ground to a virtual halt. There are several reasons for this; chief among them are security and deployment problems. But that's all about to change. With the .NET Framework, you can participate in building the distributable rich client of the future. In this article, the author enumerates the pertinent features of .NET that will allow you to build safe, easily deployable controls. The features discussed include managed code, code access security, versioning control, Windows Forms classes, and isolation.

Jason Clark

MSDN Magazine June 2002

Comparing Enum values in a collection - BC42025: Access of shared member, constant member, enum mem


I am upgrading from asp1.1 to 2.0

I use collection classes to sort data (e.g in datagrids etc)


Enum newsFields
End Enum

Public Overloads Sub Sort(ByVal sortField As newsFields, ByVal isAscending As Boolean)
Select Case sortField
Case newsFields.title

Reading values from data access component individually



I am trying to pick data from the database through data access layer and use those values in different text boxes on the page.Basically on a click on the form, modal popup is planned to read the database and put the values into different text boxes which can be latter changed/ updated.

 What I am unable to do is accessing those values on the form itself progamatically. I will be thankful for any ideas and help.

My data access component is as follows:




new SqlParameter ("@reg_id", SqlDbType.Int ));"@reg_id"].Value=reg_id;try




Writing Webservice return values to table within SQL CLR

Visual Studio 2010/Sql Server 2005/ .net 3.5/ C# I have compiled and created assemblies and all works fine when all I do is .pipe.send.   I have changed it now to capture the values in local parameters so I can write to a sql table on the same server.  I have the connection to the database and the table created.  The code compiles fine but when I run it from sql I get the following error.  The code follows the error.   Msg 6522, Level 16, State 1, Procedure CventSP, Line 0 A .NET Framework error occurred during execution of user-defined routine or aggregate "CventSP": System.Data.SqlClient.SqlException: Incorrect syntax near '@eventtitle'. System.Data.SqlClient.SqlException: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnectionSmi.EventSink.DispatchMessages(Boolean ignoreNonFatalMessages) at Microsoft.SqlServer.Server.SmiEventSink_Default.DispatchMessages(Boolean ignoreNonFatalMessages) at System.Data.SqlClient.SqlCommand.RunExecuteNonQuerySmi(Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at StoredP

How to access querystring values from javascript after url rewriting?

Hi mates, I´m using ASP.NET 3.5 with C#. The problem that I have is the following. I´m using url rewriting (in the Global.asax file) and people see urls like this:http://localhost:1855/uk/london but after I rewrite the urls I work internally with querystring values and the urls become somehting like this:http://localhost:1855/post.aspx?co=1&ci=1In my Global.asax after I create the proper url with the querystring values I just apply it with the following sentence (this is an example):Context.RewritePath("/post.aspx?co=1&ci=1");The problem is that from javascript using the following function I access the first url and not the second:function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split("&"); for (var i = 0; i < vars.length; i++) { var pair = vars[i].split("="); if (pair[0] == variable) { return pair[1]; } } } I need to access the querystring values because I need to load values in a textbox using jQuery.autocomplete and Web Services. Can anyone tell me how to access the rewritten url to get the querystring values?Thanks in advance mates

Getting VP.NET code to respond to SQL Return values and Error Codes


I have SQL stored procedures that will return values depending on the outcome of its execution. I have the following code at the end of each of my Stored Procedures:

RETURN @siReturnValue

It would be great to be able to use this Return value after running the Stored Procedures from my VB.NET code. I have included an example of how I am running SQL Stored Procedures below:

    Public Function SearchKeyword(ByVal SearchString As String) As Data.DataTable
        Dim AerialConnection = New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("aerialConnectionString").ConnectionString)
        Dim MediaArchive As New Data.DataTable
        Dim reader As SqlDataReader
            Dim SelectMediaArchiveCommand = New SqlCommand("EXEC spSearch @keywords", AerialConnection)
            SelectMediaArchiveCommand.Parameters.AddWithValue("keywords", SearchString)
            reader = SelectMediaArchiveCommand.ExecuteReader()
        Catch e As Exception
        End Try
        Return MediaArchive
    End Function

How can I code this to respond to different Return values, or even error cod

Capturing USB Barcode Scanner Return values



We are using USB barcode scanner to scan material barcode labels. These lables are from our vendors.

We does not have control over the label generation. We are using USB barcode scanner for scanning purpose. We want to capture USB barcode scanner output. Normally the scanner returns output in the place holder in which the cursor present.

But we do not put writable text box for the cursor. Instead of write allowable text box we want to put locked or readonly text box in the screen and want to capture scanner value.

How can we do?

Assume that our barcode scanner does not support serial ports.

S. Muhilan


encoding function parameters and return values when binaryMessageEncoding is used


Dear All,

I'm creating simple web service that will accept some parameters (such as customer name and file name) and return content of an xml file as a string and WS client will save it on his side. I'm using custom binding with binaryMessageEncoding and httpTransport. The question is if it is possible to have these input parameters as well as returned xml content binary encoded somehow?

Thanks in advance for your help!


How can i access claaes Property values in xml file ?



actually i am creating sitemap.sitemap is actually an xml file.And i have stored each page's url  of my project as Public shared property of a class.Now while creating sitemap xml file i want to get access to those property on my class, so that url should not be hardcoded.How can i do that ?

Please help .

Return a user and a set of values from the same sproc


I have a user table with userID, userName ...the standards.
I also have a "Material" table with materialID, materialName, etc.

I combine these in another table "UsersMaterial" with userID and materialID, depending on which materials the user has chosen (between 0 and 5).

Now I need a stored procedure that returns the user information + the set of materials that is mapped to the user.

But I can't see how I can return one row of user information combined with a set of the user materials? Do I join or can I return a set + one row?

Thanks in advance!


How to access property values in the model that you are binding to? - Help!


From within a custom modelBinder (derived from DefaultModelBinder), how do I access the existing values of properties in the model into which the new values are being injected?

Thanks in advance for your help!

Return values on VB.NET functions


I have been reading that a value needs to be returned by a function, otherwise the following error will occur:

"Function <function name> doesn't return a value on all code paths. A null reference exception could occur at run time when the result is used."

The cure, I have found, is to return something (i.e. "Return 0") before exiting the function. Can someone please enlighten me as to why this might be useful? Can I pass this return value back to the routine that called the function? If so, how do I code this?

Most of the time, however, I find I'm not needing to return a value anyway, and just end up adding "0" to the ends of all my Return statements. Does anyone have any comments on this?

Links referred to:



return values


i'm trying to check if the text fields are blank i attached the code below, if i leave both textbox blank, both alerts pop up but confirm

how to make it like if the first textbox is blank, alert pop up then exit everything?

 function Validation()
if (IsValid()) {
  if (!(confirm("Are you sure you want to save this record?")))
  return false;
return true; 

function IsValid()
if (!isDate(document.getElementById('txtTest')))
alert("Please insert a Date");
return false;

if (!isBlank(document.getElementById('txtTest2')))
alert("Please insert a Holiday Name ");
return false;
return true;

asp:button onclientclick="return Validation()"

select query doesnt return values


hi all, i need your assistance please.


select Comments.Id,SuroundId,ArticleId,PosterId,PostRime,Subject,Body,Visible,Users.Username
from dbo.Comments
inner join Users on Comments.PosterId=Users.Id
where SuroundId=@suround and ArticleId=@articleId

for some reason it doesnt return any values.

before i've added the inner join it worked perfectly.

i couldn't find my mistake, though i passed over it several times.



Insert NULL values into Integer column in Access 2007 tables

hi  there:

  My source data  is below and it's in CSV format

Days waited


My destination is a Number column in a 2007 access table  and the required property is set to NO

First question :

   I used a Data conversion task in DFT to convert [DT_STR] to Integer as SSIS seems to default the source as DT_STR type. However, SSIS keeps complaining that

"The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data."

I know that's because of those NULL values. how to solve this issue?


--Currently using Reporting Service 2000; Visual Studio .NET 2003; Visual Source Safe SSIS 2008 SSAS 2008, SVN --

Stored Procedures Only Return integer values?


I have the following stored procedure

ALTER PROCEDURE dbo.GetProvMoveModifier
	@prov_id int 
	DECLARE	   @mod float
	WHERE      (PROV_DETAILS.PROV_ID = @prov_id)
	RETURN     @mod

MOVE_MOD is defined as a float.

Yet within Dataclasses.designer.cs the function gets added as:

	public int GetProvMoveModifier([Parameter(DbType="Int")] System.Nullable<int> prov_id)
		IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), prov_id);
		return ((int)(result.ReturnValue));

Naturally this is causing some issues as my C# code needs to handle decimal values.  If I try to manually change the designer code to use floats, I get the following error

'System.Single' is not a valid return type for a mapped stored procedure method.

Any thoughts?  I could setup a work-around, but I would think I could return a decimal value from a stored procedure.

how to access arraylist values


  protected void chkChanged(object sender, EventArgs e)
        for (int i = 0; i < GridView2.Rows.Count; i++)
            CheckBox chkb = (CheckBox)GridView2.Rows[i].Cells[0].FindControl("chkcolumn");

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend