Try
RadTextBox8.Text = myTable.Compute("SUM(PercentageInMix)", "ProductCode = '" & txtProductCode.Text & "' ")
Catch ex As Exception
MsgBox(ex.Message)
End Try
conversion from dbnull to sting is not valid
Page 1 of 11 Replies - 244 Views - Last Post: 19 July 2012 - 05:45 AM
#1
conversion from dbnull to sting is not valid
Posted 19 July 2012 - 05:28 AM
I am usiing the code below to calculate the sum of rows in my datatable with the productcode in the textbox but if the code is not in the datatable I get the error "conversion from dbnull to sting is not valid". How can i trap this error in this scenario.
Replies To: conversion from dbnull to sting is not valid
#2
Re: conversion from dbnull to sting is not valid
Posted 19 July 2012 - 05:45 AM
I even tried this
RadTextBox8.Text = myTable.Compute("SUM(PercentageInMix)", String.IsNullOrEmpty("ProductCode = '" & txtProductCode.Text & "' "))
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote



|