S
Sebastian
I'm trying to connect a query I made in the Access
database to populate a grid.I'm using the following code
and I get a error:
Specified cast is not valid.
on the first line below. Any Ideas?
Dim DataAdp As OleDbDataAdapter = New OleDbDataAdapter
("GetInvoices", DBvar)
DataAdp.SelectCommand.CommandType =
CommandType.StoredProcedure
If Not IsDBNull(DataAdp) Then
Try
DataAdp.Fill(ds, "Invoices")
Catch ex As Exception
MsgBox(ex.Message,
MsgBoxStyle.Critical, "Error:")
End Try
GrdInvoices.DataSource = dataset.Tables
("Invoices")
End If
ts.MappingName = dataset.Tables
("Invoices").TableName
database to populate a grid.I'm using the following code
and I get a error:
Specified cast is not valid.
on the first line below. Any Ideas?
Dim DataAdp As OleDbDataAdapter = New OleDbDataAdapter
("GetInvoices", DBvar)
DataAdp.SelectCommand.CommandType =
CommandType.StoredProcedure
If Not IsDBNull(DataAdp) Then
Try
DataAdp.Fill(ds, "Invoices")
Catch ex As Exception
MsgBox(ex.Message,
MsgBoxStyle.Critical, "Error:")
End Try
GrdInvoices.DataSource = dataset.Tables
("Invoices")
End If
ts.MappingName = dataset.Tables
("Invoices").TableName