Click here to Skip to main content
15,884,425 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Find Control Pin
Assaf8227-Sep-08 12:25
Assaf8227-Sep-08 12:25 
Questionlinkbutton Pin
UD(IA)27-Sep-08 2:15
UD(IA)27-Sep-08 2:15 
AnswerRe: linkbutton Pin
Paul Conrad27-Sep-08 5:33
professionalPaul Conrad27-Sep-08 5:33 
AnswerRe: linkbutton Pin
saini arun27-Sep-08 8:24
saini arun27-Sep-08 8:24 
QuestionIntegrated Windows autentication not working??? Pin
Nada Adel27-Sep-08 0:21
Nada Adel27-Sep-08 0:21 
Questionquerystring Pin
UD(IA)26-Sep-08 22:30
UD(IA)26-Sep-08 22:30 
AnswerRe: querystring Pin
snouto26-Sep-08 22:45
snouto26-Sep-08 22:45 
Questionhandle a db null value Pin
Meax26-Sep-08 22:00
Meax26-Sep-08 22:00 
<br />
Dim CurrentMaxDocumentIDForASpecificUser As Integer<br />
<br />
Private Sub GetMaxDocumentIDForASpecificUser()<br />
<br />
        Dim Get_MaxDocumentIDForASpecificUser_StrSQL As String<br />
        Dim Get_MaxDocumentIDForASpecificUser_ObjCmd As SqlCommand<br />
<br />
<br />
        Dim strConn As String = ConfigurationManager.ConnectionStrings("HomeConnectionString").ToString()<br />
<br />
        Dim MyCon As SqlConnection<br />
        MyCon = New SqlConnection(strConn)<br />
<br />
        Get_MaxDocumentIDForASpecificUser_StrSQL = "Select max(DocumentID) from UploadedDocuments where Owner='" & Trim(Session("CurrentlyLogedinUserName")) & "'"<br />
<br />
        MyCon.Open()<br />
<br />
        Get_MaxDocumentIDForASpecificUser_ObjCmd = New SqlCommand(Get_MaxDocumentIDForASpecificUser_StrSQL, MyCon)<br />
<br />
        CurrentMaxDocumentIDForASpecificUser = Get_MaxDocumentIDForASpecificUser_ObjCmd.ExecuteScalar<br />
<br />
        MyCon.Close()<br />
<br />
    End Sub<br />


when i run this code for the very first time(when db table is empty)i am getting the following eror:

Conversion from type 'DBNull' to type 'Integer' is not valid.

how can i check this for null?
AnswerRe: handle a db null value Pin
snouto26-Sep-08 22:57
snouto26-Sep-08 22:57 
GeneralRe: handle a db null value Pin
Meax26-Sep-08 23:24
Meax26-Sep-08 23:24 
GeneralRe: handle a db null value Pin
AlexeiXX327-Sep-08 17:15
AlexeiXX327-Sep-08 17:15 
QuestionLogic for Attendance System Pin
Milind Panchal26-Sep-08 21:47
Milind Panchal26-Sep-08 21:47 
AnswerRe: Logic for Attendance System Pin
sumanth Reddy26-Sep-08 22:39
sumanth Reddy26-Sep-08 22:39 
AnswerRe: Logic for Attendance System Pin
Paul Conrad27-Sep-08 5:34
professionalPaul Conrad27-Sep-08 5:34 
GeneralRe: Logic for Attendance System Pin
leckey27-Sep-08 13:37
leckey27-Sep-08 13:37 
GeneralRe: Logic for Attendance System Pin
Paul Conrad27-Sep-08 14:13
professionalPaul Conrad27-Sep-08 14:13 
GeneralRe: Logic for Attendance System Pin
leckey27-Sep-08 14:54
leckey27-Sep-08 14:54 
GeneralRe: Logic for Attendance System Pin
Paul Conrad27-Sep-08 17:44
professionalPaul Conrad27-Sep-08 17:44 
QuestionSeerver Controls.. Pin
Jamal Abdul Nasir26-Sep-08 21:29
Jamal Abdul Nasir26-Sep-08 21:29 
QuestionProblem visual basic 'exe' run on IIS through asp.net Pin
Rinki Mukheraji26-Sep-08 21:12
Rinki Mukheraji26-Sep-08 21:12 
QuestionAJAX CALL Pin
CrazyCoder2626-Sep-08 21:11
CrazyCoder2626-Sep-08 21:11 
AnswerRe: AJAX CALL Pin
AlexeiXX327-Sep-08 17:38
AlexeiXX327-Sep-08 17:38 
AnswerRe: AJAX CALL Pin
Prasanna Kumar Pete28-Sep-08 22:33
Prasanna Kumar Pete28-Sep-08 22:33 
Questionhow to call classes in web site using C#.net Pin
sumanth Reddy26-Sep-08 21:09
sumanth Reddy26-Sep-08 21:09 
AnswerRe: how to call classes in web site using C#.net Pin
snouto26-Sep-08 23:02
snouto26-Sep-08 23:02 

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.