Click here to Skip to main content
15,923,120 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Object reference not set to an instance of an object error Pin
cstrader23219-Feb-08 6:06
cstrader23219-Feb-08 6:06 
GeneralRe: Object reference not set to an instance of an object error Pin
Aptiva Dave19-Feb-08 6:38
Aptiva Dave19-Feb-08 6:38 
GeneralRe: Object reference not set to an instance of an object error Pin
cstrader23219-Feb-08 6:47
cstrader23219-Feb-08 6:47 
GeneralRe: Object reference not set to an instance of an object error Pin
Aptiva Dave19-Feb-08 6:50
Aptiva Dave19-Feb-08 6:50 
GeneralRe: Object reference not set to an instance of an object error Pin
cstrader23219-Feb-08 7:08
cstrader23219-Feb-08 7:08 
GeneralRe: Object reference not set to an instance of an object error Pin
Aptiva Dave19-Feb-08 7:32
Aptiva Dave19-Feb-08 7:32 
GeneralRe: Object reference not set to an instance of an object error Pin
Dave Kreskowiak19-Feb-08 8:44
mveDave Kreskowiak19-Feb-08 8:44 
GeneralRe: Object reference not set to an instance of an object error Pin
Aptiva Dave19-Feb-08 8:47
Aptiva Dave19-Feb-08 8:47 
Well, here is my code for the count function:

Public Function count(ByVal search As String, ByVal startDate As String, ByVal endDate As String) As Integer<br />
        Dim number As Integer<br />
        Dim pubs As New SqlConnection(ConfigurationManager.ConnectionStrings("WIA_Report_Builder.My.MySettings.wiaConnectionString").ConnectionString)<br />
        'pubs = ConfigurationManager.ConnectionStrings("wiaconnectionstring")<br />
        'pubs.ConnectionString = ConfigurationManager.ConnectionStrings("WIA_Report_Builder.My.MySettings.wiaConnectionString").ConnectionString<br />
        Dim connection As DbConnection = New SqlConnection()<br />
        connection.ConnectionString = pubs.ConnectionString<br />
        Dim cmd As DbCommand = connection.CreateCommand()<br />
        cmd.CommandType = CommandType.Text<br />
        Select Case search<br />
            Case "TotalAdultPart"<br />
                cmd.CommandText = "Select Count (*) from Demographics where AgeatEnroll >= 22"<br />
                Try<br />
                    connection.Open()<br />
                    number = cmd.ExecuteScalar<br />
<br />
                Catch ex As Exception<br />
                Finally<br />
                    connection.Close()<br />
                End Try<br />
....<br />
<br />
 End Select<br />
        Return number<br />
<br />
end function<br />

GeneralRe: Object reference not set to an instance of an object error Pin
Dave Kreskowiak19-Feb-08 11:03
mveDave Kreskowiak19-Feb-08 11:03 
GeneralRe: Object reference not set to an instance of an object error Pin
Aptiva Dave19-Feb-08 11:09
Aptiva Dave19-Feb-08 11:09 
GeneralRe: Object reference not set to an instance of an object error Pin
cstrader23219-Feb-08 12:35
cstrader23219-Feb-08 12:35 
GeneralRe: Object reference not set to an instance of an object error Pin
Aptiva Dave19-Feb-08 17:26
Aptiva Dave19-Feb-08 17:26 
GeneralRe: Object reference not set to an instance of an object error Pin
Dave Kreskowiak19-Feb-08 14:16
mveDave Kreskowiak19-Feb-08 14:16 
QuestionModify Form1 control from BGW on Form 2? Pin
cstrader23219-Feb-08 3:28
cstrader23219-Feb-08 3:28 
AnswerRe: Modify Form1 control from BGW on Form 2? Pin
cstrader23219-Feb-08 12:32
cstrader23219-Feb-08 12:32 
AnswerRe: Modify Form1 control from BGW on Form 2? Pin
Dave Kreskowiak20-Feb-08 5:10
mveDave Kreskowiak20-Feb-08 5:10 
GeneralRe: Modify Form1 control from BGW on Form 2? Pin
cstrader23220-Feb-08 5:49
cstrader23220-Feb-08 5:49 
GeneralBroadcasting audio Over LAN Pin
Paramhans Dubey19-Feb-08 2:29
professionalParamhans Dubey19-Feb-08 2:29 
GeneralRe: Broadcasting audio Over LAN Pin
Dave Kreskowiak20-Feb-08 5:04
mveDave Kreskowiak20-Feb-08 5:04 
Generalnot storing correct value in sql server from a vb.net application Pin
vb_buddy19-Feb-08 0:22
vb_buddy19-Feb-08 0:22 
GeneralRe: not storing correct value in sql server from a vb.net application Pin
Colin Angus Mackay19-Feb-08 4:40
Colin Angus Mackay19-Feb-08 4:40 
GeneralVB/SQL Question(Dave) Pin
Vimalsoft(Pty) Ltd18-Feb-08 22:32
professionalVimalsoft(Pty) Ltd18-Feb-08 22:32 
GeneralRe: VB/SQL Question(Dave) Pin
Dave Kreskowiak20-Feb-08 5:01
mveDave Kreskowiak20-Feb-08 5:01 
AnswerRe: VB/SQL Question(Dave) Pin
Vimalsoft(Pty) Ltd21-Feb-08 1:28
professionalVimalsoft(Pty) Ltd21-Feb-08 1:28 
GeneralWord content not Properly shown in RichTextbox Pin
Rupesh Kumar Swami18-Feb-08 21:28
Rupesh Kumar Swami18-Feb-08 21:28 

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.