Click here to Skip to main content
15,915,750 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Delete Key Doesnt Work in fields Pin
Muntyness31-Oct-06 3:14
Muntyness31-Oct-06 3:14 
GeneralRe: Delete Key Doesnt Work in fields Pin
Muntyness31-Oct-06 3:25
Muntyness31-Oct-06 3:25 
GeneralRe: Delete Key Doesnt Work in fields Pin
OldWarhorse31-Oct-06 13:30
OldWarhorse31-Oct-06 13:30 
QuestionNero SDK with VB 6.0 Pin
harry_tan29-Oct-06 22:16
harry_tan29-Oct-06 22:16 
AnswerRe: Nero SDK with VB 6.0 Pin
Dave Kreskowiak30-Oct-06 3:49
mveDave Kreskowiak30-Oct-06 3:49 
QuestionGetting Problem if not Debugging? Pin
aloksingh200629-Oct-06 20:07
aloksingh200629-Oct-06 20:07 
AnswerRe: Getting Problem if not Debugging? Pin
Dave Kreskowiak30-Oct-06 3:52
mveDave Kreskowiak30-Oct-06 3:52 
Questionconversion from type 'DBNull' to type 'String' is not valid??? Pin
Subjugate29-Oct-06 19:46
Subjugate29-Oct-06 19:46 
i met up with "conversion from type 'DBNull' to type 'String' is not valid" error when i am doing my project. My code are as follows hope someone could help.Confused | :confused:
Try
Dim strSelected As String
Dim strShutdownTime As String = DTPickerStartDate.Text + " " + DTPickerTime.Text
Dim sqlStr As String = ("Select * from EventTable")
Dim dTable As DataTable
Dim db As New DBController
Dim flagInsert As Boolean = True
Dim strActionName1 As String = ""
'Dim strActionName As String = TxtActionName.Text
dTable = New DataTable()
db.Connect("PCMgr.mdb")

db.retrieveDTable(sqlStr, dTable)

Dim TReader As DataTableReader
TReader = New DataTableReader(dTable)
If RadDaily.Checked Then
strSelected = RadDaily.Text
End If
If RadWeekly.Checked Then
strSelected = RadWeekly.Text
End If
If RadMonthly.Checked Then
strSelected = RadMonthly.Text
End If
If RadSpecial.Checked Then
strSelected = RadSpecial.Text
End If
While TReader.Read
flagInsert = False
strActionName1 = dTable.Rows(0)("ActionName")
If strActionName1 = TxtActionName.Text Then
db.Connect("PCMgr.mdb")
db.InsertRecord("UPDATE EventTable" + " set NextActionDateAndTime='" + strShutdownTime.Trim + "' where strTimeDo='" + DTPickerTime.Text + "'")

db.Close()
Else
db.Connect("PCMgr.mdb")
db.InsertRecord("Insert into EventTable" + "(TargetGroup, ActionDone,TimeDo, StartDate, NextActionDateAndTime, Frequency, Status, EndDate, ActionName) values ('" + CboChoices.Text + "','" + CboType.Text + "','" + DTPickerTime.Text + "','" + DTPickerStartDate.Text + "','" + strShutdownTime.Trim + "','" + strSelected.Trim + "','" + "Running" + "','" + DTPickerEndDate.Text + "','" + TxtActionName.Text + "')")

db.Close()
End If


If flagInsert = True Then
db.Connect("PCMgr.mdb")
db.InsertRecord("Insert into EventTable" + "(TargetGroup, ActionDone,TimeDo, StartDate, NextActionDateAndTime) values ('" + CboChoices.Text + "','" + strSelected.Trim + "','" + DTPickerTime.Text + "','" + DTPickerStartDate.Text + "','" + strShutdownTime.Trim + "')")
db.Close()
End If

End While
'TimerShutDown.Enabled = True
Catch ex As Exception
MessageBox.Show(ex.Message)

End Try
End Sub
AnswerRe: conversion from type 'DBNull' to type 'String' is not valid??? Pin
shreekar29-Oct-06 20:19
shreekar29-Oct-06 20:19 
GeneralRe: conversion from type 'DBNull' to type 'String' is not valid??? Pin
Subjugate29-Oct-06 21:00
Subjugate29-Oct-06 21:00 
GeneralRe: conversion from type 'DBNull' to type 'String' is not valid??? Pin
shreekar29-Oct-06 21:28
shreekar29-Oct-06 21:28 
GeneralRe: conversion from type 'DBNull' to type 'String' is not valid??? Pin
Subjugate29-Oct-06 22:36
Subjugate29-Oct-06 22:36 
GeneralRe: conversion from type 'DBNull' to type 'String' is not valid??? Pin
shreekar29-Oct-06 22:51
shreekar29-Oct-06 22:51 
GeneralRe: conversion from type 'DBNull' to type 'String' is not valid??? Pin
Subjugate29-Oct-06 22:57
Subjugate29-Oct-06 22:57 
GeneralRe: conversion from type 'DBNull' to type 'String' is not valid??? Pin
shreekar29-Oct-06 23:48
shreekar29-Oct-06 23:48 
AnswerRe: conversion from type 'DBNull' to type 'String' is not valid??? Pin
Software_Guy_12330-Oct-06 21:52
Software_Guy_12330-Oct-06 21:52 
GeneralRe: conversion from type 'DBNull' to type 'String' is not valid??? Pin
Subjugate2-Nov-06 14:41
Subjugate2-Nov-06 14:41 
Questionget height of detail section in crystal report Pin
aparna.shukla129-Oct-06 19:18
aparna.shukla129-Oct-06 19:18 
Questionhow to show data at DATAGRID using data enviroment? [HELP need to show to my boss soon...] Pin
campbells29-Oct-06 19:02
campbells29-Oct-06 19:02 
AnswerRe: how to show data at DATAGRID using data enviroment? [HELP need to show to my boss soon...] Pin
Are Jay29-Oct-06 19:18
Are Jay29-Oct-06 19:18 
GeneralRe: how to show data at DATAGRID using data enviroment? [HELP need to show to my boss soon...] Pin
campbells29-Oct-06 19:38
campbells29-Oct-06 19:38 
GeneralRe: how to show data at DATAGRID using data enviroment? [HELP need to show to my boss soon...] Pin
Are Jay30-Oct-06 4:08
Are Jay30-Oct-06 4:08 
GeneralRe: how to show data at DATAGRID using data enviroment? [HELP need to show to my boss soon...] Pin
campbells8-Nov-06 17:42
campbells8-Nov-06 17:42 
GeneralRe: how to show data at DATAGRID using data enviroment? [HELP need to show to my boss soon...] Pin
Are Jay9-Nov-06 5:53
Are Jay9-Nov-06 5:53 
AnswerRe: how to show data at DATAGRID using data enviroment? [HELP need to show to my boss soon...] Pin
aparna.shukla129-Oct-06 19:24
aparna.shukla129-Oct-06 19:24 

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.