Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: (untagged)
SQL
ELSE IF (@CALL_TYPE = 14) --MODIFIED BY MANI ADDING ASSET STATUS

BEGIN
                         select (CASE  ASSETSTATUS
                                        WHEN 0 THEN 'NONE'
                                        WHEN 1 THEN 'NOT REGISTERD'
                                        WHEN 2 THEN 'RENEWED'
                                        WHEN 3 THEN 'DECLINED'
                                        WHEN 4 THEN 'REGISTERD'
                                        WHEN 5 THEN 'EXPIRED'
                                        WHEN 6 THEN 'REPLACE'
                                        WHEN 50 THEN 'UNMANAGED'
                                        WHEN 10 THEN 'DISCONNECTED'
                                        WHEN 101 THEN 'STOCK'
                                        WHEN 102 THEN 'INSERVICE'
                                        WHEN 103 THEN 'REPAIR'
                                        WHEN 104 THEN 'DISCARD'
                                        WHEN 105 THEN 'GIFT'
                                        WHEN 110 THEN 'DISPOSED' END)  from AMASSET_STT
                        WHERE
                        DATAAREAID =  @DATAAREAID
                        end


Im using visual studio 2005,Vb.net and sql server 2005.
im facing problem in .vb page that conversion string to integer.

objAsset is a class file where we declare properties.

ddlAssetStatus is DDL Control id.

objAsset.AssetStatus=ddlAssetStatus.SelectedValue
Now you any one can help me

This is the stored procedure for populating dropdown AssetStatus.



In database it is working while in calling in .net application it raising an error
conversion failed string to integer.

Asset Status is a DropDownList, ddlAssetStatus.SelectedValue here im getting
error.
please help me.

Thanks in Advance.
Posted
Updated 1-Jul-11 0:52am
v3
Comments
Prerak Patel 1-Jul-11 5:28am    
Share your .Net code too.

1 solution

Seeing as your code is what is blowing up, perhaps you need to post the code ? You apparently are trying to convert the string to an integer, which obviously won't work. My guess, you're getting the number AND the value, and trying to convert the wrong thing. But, how can I tell without seeing your broken code.

What on earth is 'CodeProject' for a tag ? This question has NOTHING to do with CP, it's about C#, or VB.NET, and about either ASP.NET, Winforms, or perhaps WPF. See, without seeing code, we don't even know what framework you're using, b/c you didn't tag it properly.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900