Click here to Skip to main content
15,886,362 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: unable to retain value of session variable Pin
Yusuf2-Apr-09 16:51
Yusuf2-Apr-09 16:51 
AnswerRe: unable to retain value of session variable Pin
Alok Sharma ji2-Apr-09 13:08
Alok Sharma ji2-Apr-09 13:08 
GeneralRe: unable to retain value of session variable Pin
parkash_C2-Apr-09 13:22
parkash_C2-Apr-09 13:22 
GeneralRe: unable to retain value of session variable Pin
dotnetmember2-Apr-09 21:28
dotnetmember2-Apr-09 21:28 
Generaldeclare ValueFromDB Pin
David Mujica2-Apr-09 7:55
David Mujica2-Apr-09 7:55 
GeneralRe: declare ValueFromDB Pin
Colin Angus Mackay2-Apr-09 8:13
Colin Angus Mackay2-Apr-09 8:13 
GeneralRe: declare ValueFromDB Pin
Yusuf2-Apr-09 9:50
Yusuf2-Apr-09 9:50 
Questionperform subtration on a field obtained from DB but not getting correct value as result Pin
Meax2-Apr-09 7:09
Meax2-Apr-09 7:09 
i have a filed saved in sql sever db and its data type is int.

i fetch that field from db using this code and assign it to a variable called 'ValueFromDB'

<br />
Private Sub GetMyIntDataTypeField()<br />
<br />
        Dim Get_ MyIntDataTypeField_StrSQL As String<br />
        Dim Get_ MyIntDataTypeField_ObjCmd As SqlCommand<br />
<br />
        Dim strConn As String = ConfigurationManager.ConnectionStrings("MyConnString").ToString()<br />
<br />
<br />
        Dim MyCon As SqlConnection<br />
        MyCon = New SqlConnection(strConn)<br />
<br />
        Get_ MyIntDataTypeField_StrSQL = "Select MyIntField from MyTable"<br />
<br />
        MyCon.Open()<br />
<br />
        Get_ MyIntDataTypeField_ObjCmd = New SqlCommand(Get_ MyIntDataTypeField_StrSQL, MyCon)<br />
<br />
        ValueFromDB = Get_ MyIntDataTypeField_StrSQL_ObjCmd.ExecuteScalar<br />
<br />
        MyCon.Close()<br />
<br />
    End Sub<br />


after obtaining this value i need to perform a simple subtraction, like

a = ValueFromDB - 17.

after subtraction i am getting, a = -17.

is this because "ValueFromDB" from DB in string format?
AnswerRe: perform subtration on a field obtained from DB but not getting correct value as result Pin
ToddHileHoffer2-Apr-09 7:44
ToddHileHoffer2-Apr-09 7:44 
QuestionAjax ModalPopUpExtender Not Hiding on Load? Pin
codingrocks2-Apr-09 6:29
codingrocks2-Apr-09 6:29 
AnswerRe: Ajax ModalPopUpExtender Not Hiding on Load? Pin
Alok Sharma ji2-Apr-09 12:46
Alok Sharma ji2-Apr-09 12:46 
Questioncan somebody please tell me why this will not work? Pin
learningman2-Apr-09 5:55
learningman2-Apr-09 5:55 
AnswerRe: can somebody please tell me why this will not work? Pin
Yusuf2-Apr-09 6:15
Yusuf2-Apr-09 6:15 
GeneralRe: can somebody please tell me why this will not work? Pin
learningman2-Apr-09 10:30
learningman2-Apr-09 10:30 
Question[Message Deleted] Pin
liz32-Apr-09 5:38
liz32-Apr-09 5:38 
AnswerRe: Cookie concept question Pin
Yusuf2-Apr-09 5:50
Yusuf2-Apr-09 5:50 
QuestionResources Allocation in asp.net Pin
MallikarjunaGupta2-Apr-09 5:22
MallikarjunaGupta2-Apr-09 5:22 
AnswerRe: Resources Allocation in asp.net Pin
Yusuf2-Apr-09 5:35
Yusuf2-Apr-09 5:35 
Questionthe question about ActiveReport 2.0 with vb.net ... Pin
ice-hotty2-Apr-09 5:04
ice-hotty2-Apr-09 5:04 
GeneralRe: dropdownlist proble Pin
indian222-Apr-09 4:18
indian222-Apr-09 4:18 
GeneralRe: dropdownlist proble Pin
Yusuf2-Apr-09 5:42
Yusuf2-Apr-09 5:42 
QuestionJavaScript Function does not work on the server? Pin
codddy2-Apr-09 4:10
codddy2-Apr-09 4:10 
AnswerRe: JavaScript Function does not work on the server? Pin
Yusuf2-Apr-09 5:51
Yusuf2-Apr-09 5:51 
QuestionAny alternate method to get ip address , browser version and type in C# not in js Pin
Alok Sharma ji2-Apr-09 3:18
Alok Sharma ji2-Apr-09 3:18 
AnswerGet IP address in VB Pin
David Mujica2-Apr-09 4:44
David Mujica2-Apr-09 4:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.