Click here to Skip to main content
16,005,169 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Strange behavior in listbox control - VB.NET 2.0 Pin
Christian Graus11-Mar-08 10:03
protectorChristian Graus11-Mar-08 10:03 
GeneralRe: Strange behavior in listbox control - VB.NET 2.0 Pin
Marcus J. Smith11-Mar-08 10:22
professionalMarcus J. Smith11-Mar-08 10:22 
GeneralRe: Strange behavior in listbox control - VB.NET 2.0 Pin
Christian Graus11-Mar-08 10:34
protectorChristian Graus11-Mar-08 10:34 
GeneralRe: Strange behavior in listbox control - VB.NET 2.0 Pin
Marcus J. Smith11-Mar-08 10:44
professionalMarcus J. Smith11-Mar-08 10:44 
GeneralRe: Strange behavior in listbox control - VB.NET 2.0 Pin
Christian Graus11-Mar-08 10:53
protectorChristian Graus11-Mar-08 10:53 
GeneralRe: Strange behavior in listbox control - VB.NET 2.0 Pin
Marcus J. Smith11-Mar-08 11:00
professionalMarcus J. Smith11-Mar-08 11:00 
GeneralFinding which Item was clicked in a webbrowser Pin
Ahmad Zaidi11-Mar-08 7:05
Ahmad Zaidi11-Mar-08 7:05 
GeneralObject Reference not set to an instance--Urgent Please help Pin
devsheoran11-Mar-08 6:48
devsheoran11-Mar-08 6:48 
D'Oh! | :doh: Hi,
I am getting the this error :Object Reference not set to an instance.
when i debug i came to know that 'qry' is not initialized.Bui have initialized it.Don't Know why 'qry' is not getting initialized.

my code is:

Dim rdoSex As String
Dim CreateDate As String
Dim qry as String
Dim i As Integer
CreateDate = Now.Date.ToString()
If rdoMale.Checked = True Then
rdoSex = "M"
ElseIf rdoFemale.Checked = True Then

rdoSex = "F"
Else
rdoSex = "NA"

End If
Try
qry = ""

qry = "insert into T_STU_MASTER values('" &CreateDate & "','" & txtStudentName.Text.Trim() & "','" & txtFatherName.Text.Trim() & "','" & txtMotherName.Text.Trim() & "','" & rdoSex & "','" & dtpDOB.Text.Trim() & "','" & cmbVillage.SelectedItem.ToString().Trim() & "')"
cmd = New SqlCommand(qry, con)
'//Error is thrown in above line that qry is null while i have initialized it
i = cmd.ExecuteNonQuery()
If i > 0 Then
MsgBox("Information Saved Successfully!!!")
End If

Catch ex As Exception
MsgBox(ex.ToString())
Finally
con.Close()


End Try
GeneralRe: Object Reference not set to an instance Pin
Guffa11-Mar-08 7:58
Guffa11-Mar-08 7:58 
GeneralRe: Object Reference not set to an instance--Urgent Please help Pin
Christian Graus11-Mar-08 8:21
protectorChristian Graus11-Mar-08 8:21 
Generaltimer!!!! Pin
Rharzkie11-Mar-08 5:26
Rharzkie11-Mar-08 5:26 
GeneralRe: timer!!!! Pin
Christian Graus11-Mar-08 8:22
protectorChristian Graus11-Mar-08 8:22 
GeneralRe: timer!!!! Pin
Rharzkie11-Mar-08 12:35
Rharzkie11-Mar-08 12:35 
GeneralRe: timer!!!! Pin
Adam Loudermilk12-Mar-08 13:36
Adam Loudermilk12-Mar-08 13:36 
GeneralCreate user wizard Pin
solarthur0111-Mar-08 5:19
solarthur0111-Mar-08 5:19 
GeneralRe: Create user wizard Pin
Christian Graus11-Mar-08 8:26
protectorChristian Graus11-Mar-08 8:26 
Generalreplace all caracters in a string that are not one of 0-9 or a-z or A-Z with a space... Pin
Support12311-Mar-08 4:48
Support12311-Mar-08 4:48 
GeneralRe: replace all caracters in a string that are not one of 0-9 or a-z or A-Z with a space... Pin
Scott Dorman11-Mar-08 5:01
professionalScott Dorman11-Mar-08 5:01 
GeneralRe: replace all caracters in a string that are not one of 0-9 or a-z or A-Z with a space... Pin
Guffa11-Mar-08 7:50
Guffa11-Mar-08 7:50 
Questionpress a key to play the audio Pin
meghanaVishwa11-Mar-08 4:23
meghanaVishwa11-Mar-08 4:23 
GeneralRe: press a key to play the audio Pin
Scott Dorman11-Mar-08 5:11
professionalScott Dorman11-Mar-08 5:11 
GeneralRe: press a key to play the audio Pin
Christian Graus11-Mar-08 8:30
protectorChristian Graus11-Mar-08 8:30 
Generalpress a key to play the audio Pin
meghanaVishwa11-Mar-08 4:10
meghanaVishwa11-Mar-08 4:10 
GeneralRe: press a key to play the audio Pin
Smithers-Jones11-Mar-08 4:16
Smithers-Jones11-Mar-08 4:16 
GeneralPlease help convert this code to VB.NET code... Pin
Support12311-Mar-08 3:54
Support12311-Mar-08 3:54 

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.