Data view rowfilter bug

G

Guest

Hi all,
I'm getting error when assigning a string to a rowfilter:
Dim dv As New DataView(MyDataTable)
Dim str As String = "Col1 = 9999999999" 'Col1 has Double data type in MS
Access database
dv.RowFilter = str ' This is the place I get overflow exception
Is this a bug or I'm missing something.
Thanks in advance for your help
Roy
 
T

tomb

Roy said:
Hi all,
I'm getting error when assigning a string to a rowfilter:
Dim dv As New DataView(MyDataTable)
Dim str As String = "Col1 = 9999999999" 'Col1 has Double data type in MS
Access database
dv.RowFilter = str ' This is the place I get overflow exception
Is this a bug or I'm missing something.
Thanks in advance for your help
Roy
What's the data type in the datatable?

Tom
 
C

Cor Ligthert [MVP]

Roy,

I made this code using VB2005, it did run until the end.
\\\
Private Sub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim dt As New DataTable
dt.Columns.Add("Col1", GetType(System.Double))
dt.LoadDataRow(New Object() {9999999999}, True)
Dim dv As New DataView(dt)
Dim str As String = "Col1 = 9999999999"
DataGrid1.DataSource = dv
End Sub
///

Can you try this as well in an empty project.

I hope this helps,

Cor
 
G

Guest

Thanks Cor for taking time and answering my question. The following code is
running and doesn't raise any exception, but if the data type extracted from
MS Access database instead, somehow treated as int32, although it's a double.
That's what I can't understand.
Thanks again
Roy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top