Click here to Skip to main content
16,006,001 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Login Control in Visual Studio 2005 Pin
Abhijit Jana12-May-08 4:57
professionalAbhijit Jana12-May-08 4:57 
AnswerRe: Login Control in Visual Studio 2005 Pin
J a a n s12-May-08 3:45
professionalJ a a n s12-May-08 3:45 
Questionasp to asp,net in firefox Pin
Ajeet mittal12-May-08 3:12
Ajeet mittal12-May-08 3:12 
Questionerror in datacolumncollection!! Pin
Karan_TN12-May-08 2:32
Karan_TN12-May-08 2:32 
AnswerRe: error in datacolumncollection!! Pin
N a v a n e e t h12-May-08 2:40
N a v a n e e t h12-May-08 2:40 
GeneralRe: error in datacolumncollection!! Pin
Karan_TN12-May-08 3:25
Karan_TN12-May-08 3:25 
QuestionIFrame problem in firefox Pin
neelakannan12-May-08 1:53
neelakannan12-May-08 1:53 
QuestionHow does this thing happens????? Pin
www.Developerof.NET12-May-08 1:24
www.Developerof.NET12-May-08 1:24 
Hi all,

From past 5-6 years i have bben taught that u should have a return statement in your function definition if ur code returns a value, but to my astonishment the following code does return a value, but threre is no return statement at all...

 Public Function GetMaximumId(ByRef ColName As String, ByRef con As SqlClient.SqlConnection, ByRef TabName As String) As Long<br />
        Dim SQL As String<br />
        Dim dr As SqlClient.SqlDataReader<br />
        SQL = "select isnull(max(substring(" & ColName & ",5,10)),'0') from " & TabName<br />
<br />
        Dim cmd As New SqlClient.SqlCommand(SQL, con)<br />
        dr = cmd.ExecuteReader<br />
        dr.Read()<br />
        If IsDBNull(dr.GetValue(0)) = True Then<br />
            GetMaximumId = 1<br />
        Else<br />
            GetMaximumId = dr.GetValue(0) + 1<br />
        End If<br />
        cmd.Dispose()<br />
        dr.Close()<br />
 End Function



How does this thing work?Confused | :confused: Confused | :confused: Confused | :confused:

When you fail to plan, you are planning to fail.

AnswerRe: How does this thing happens????? Pin
J4amieC12-May-08 1:55
J4amieC12-May-08 1:55 
GeneralRe: How does this thing happens????? Pin
www.Developerof.NET12-May-08 3:26
www.Developerof.NET12-May-08 3:26 
QuestionProblem Generating Report Through C# Pin
aalokitoaami12-May-08 1:10
aalokitoaami12-May-08 1:10 
QuestionUnwanted Authentication Prompts in SharePoint application Pin
Sangamesh Naidu12-May-08 0:57
Sangamesh Naidu12-May-08 0:57 
AnswerRe: Unwanted Authentication Prompts in SharePoint application Pin
eyeseetee12-May-08 2:15
eyeseetee12-May-08 2:15 
Questionsearch facility using index service Pin
eyeseetee12-May-08 0:51
eyeseetee12-May-08 0:51 
QuestionQuery Regading Web Parts Personalization Pin
Abhijit Jana12-May-08 0:39
professionalAbhijit Jana12-May-08 0:39 
AnswerRe: Query Regading Web Parts Personalization Pin
eyeseetee12-May-08 2:14
eyeseetee12-May-08 2:14 
GeneralRe: Query Regading Web Parts Personalization Pin
Abhijit Jana12-May-08 3:34
professionalAbhijit Jana12-May-08 3:34 
Questionsix objects in ASP.Net Pin
NarVish12-May-08 0:19
NarVish12-May-08 0:19 
AnswerRe: six objects in ASP.Net Pin
eyeseetee12-May-08 0:30
eyeseetee12-May-08 0:30 
AnswerRe: six objects in ASP.Net Pin
Colin Angus Mackay12-May-08 0:31
Colin Angus Mackay12-May-08 0:31 
AnswerRe: six objects in ASP.Net Pin
Christian Graus12-May-08 0:43
protectorChristian Graus12-May-08 0:43 
GeneralRe: six objects in ASP.Net Pin
NarVish12-May-08 1:09
NarVish12-May-08 1:09 
GeneralRe: six objects in ASP.Net Pin
J4amieC12-May-08 1:48
J4amieC12-May-08 1:48 
Questionhow to call back from server side Pin
Piyush Vardhan Singh11-May-08 23:42
Piyush Vardhan Singh11-May-08 23:42 
AnswerRe: how to call back from server side Pin
Christian Graus11-May-08 23:45
protectorChristian Graus11-May-08 23:45 

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.