Yet another designer issue

S

SAL

Bill,
Thanks for helping with my last designer issue. Now, I execute the following
query in the Query Builder and it returns one record:

SELECT
ReportedWeeds.RID, Weeds.Name, ReportedWeeds.Density, BioAgents.BName,
ReportedWeeds.Assr_SN, ReportedWeeds.TownRange, ReportedWeeds.LotSize,
ReportedWeeds.theDate, ROW.[Desc] AS RDesc, ReportedWeeds.Owner,
ReportedWeeds.OwnStAddrs, ReportedWeeds.OwnCity, ReportedWeeds.OwnState,
ReportedWeeds.OwnZip, ReportedWeeds.OwnPhone, MethodContacted.[Desc] AS
MDesc, ReportedWeeds.SitusHsnbr + ' ' + ReportedWeeds.SitusStDir + ' ' +
ReportedWeeds.SitusStName + ' ' + ReportedWeeds.SitusSType + ' ' +
ReportedWeeds.SitusCity AS SITADDRS, ReportedWeeds.Source,
ReportedWeeds.SourceCity, ReportedWeeds.SourceState,
ReportedWeeds.SourceStDir,
ReportedWeeds.SourceHsnbr, ReportedWeeds.SourceStName,
ReportedWeeds.SourceZip, ReportedWeeds.SourcePhone,
ReportedWeeds.Comments, ReportedWeeds.FollowUp, ReportedWeeds.FollowUpNotes,
ReportedWeeds.Atlas

FROM ((((ReportedWeeds LEFT OUTER JOIN
ROW ON ReportedWeeds.ROWID = ROW.ROWID) LEFT OUTER JOIN
Weeds ON ReportedWeeds.WID = Weeds.WID) LEFT OUTER JOIN
MethodContacted ON ReportedWeeds.MCID = MethodContacted.MCID) LEFT OUTER
JOIN
BioAgents ON ReportedWeeds.BioAgent = BioAgents.BAID)

WHERE (ReportedWeeds.Source LIKE '%' + ? + '%') AND (ReportedWeeds.theDate
= ?) AND (ReportedWeeds.theDate <= ?)

I pass in the following as parameters:
Palmer
1/1/2006
12/31/2006

But, when I execute this same query through the TableAdapter (that was
created via the designer), it returns an error:
The provider could not determine the Double value. For example, the row was
just created, the default for the Double column was not available, and the
consumer had not yet set a new Double value.
When I was getting this error before, it was because the SITADDRS column as
type Double. But, that error went away when I set the type as a string as it
should have been.

Can anyone help with this maybe???

S
 
G

Guest

SAL,

What code are you using to add the parameters?

Kerry Moorman


SAL said:
Bill,
Thanks for helping with my last designer issue. Now, I execute the following
query in the Query Builder and it returns one record:

SELECT
ReportedWeeds.RID, Weeds.Name, ReportedWeeds.Density, BioAgents.BName,
ReportedWeeds.Assr_SN, ReportedWeeds.TownRange, ReportedWeeds.LotSize,
ReportedWeeds.theDate, ROW.[Desc] AS RDesc, ReportedWeeds.Owner,
ReportedWeeds.OwnStAddrs, ReportedWeeds.OwnCity, ReportedWeeds.OwnState,
ReportedWeeds.OwnZip, ReportedWeeds.OwnPhone, MethodContacted.[Desc] AS
MDesc, ReportedWeeds.SitusHsnbr + ' ' + ReportedWeeds.SitusStDir + ' ' +
ReportedWeeds.SitusStName + ' ' + ReportedWeeds.SitusSType + ' ' +
ReportedWeeds.SitusCity AS SITADDRS, ReportedWeeds.Source,
ReportedWeeds.SourceCity, ReportedWeeds.SourceState,
ReportedWeeds.SourceStDir,
ReportedWeeds.SourceHsnbr, ReportedWeeds.SourceStName,
ReportedWeeds.SourceZip, ReportedWeeds.SourcePhone,
ReportedWeeds.Comments, ReportedWeeds.FollowUp, ReportedWeeds.FollowUpNotes,
ReportedWeeds.Atlas

FROM ((((ReportedWeeds LEFT OUTER JOIN
ROW ON ReportedWeeds.ROWID = ROW.ROWID) LEFT OUTER JOIN
Weeds ON ReportedWeeds.WID = Weeds.WID) LEFT OUTER JOIN
MethodContacted ON ReportedWeeds.MCID = MethodContacted.MCID) LEFT OUTER
JOIN
BioAgents ON ReportedWeeds.BioAgent = BioAgents.BAID)

WHERE (ReportedWeeds.Source LIKE '%' + ? + '%') AND (ReportedWeeds.theDate
= ?) AND (ReportedWeeds.theDate <= ?)

I pass in the following as parameters:
Palmer
1/1/2006
12/31/2006

But, when I execute this same query through the TableAdapter (that was
created via the designer), it returns an error:
The provider could not determine the Double value. For example, the row was
just created, the default for the Double column was not available, and the
consumer had not yet set a new Double value.
When I was getting this error before, it was because the SITADDRS column as
type Double. But, that error went away when I set the type as a string as it
should have been.

Can anyone help with this maybe???

S
 
S

SAL

Hi Kerry,
I have a business logic layer class that I'm using. Here's the code for this
querry:

Public Function GetWeedReportsBySourceDate(ByVal source As String, ByVal
year As Integer) As WeedRptds.ReportedWeedsDataTable
Dim startDate, endDate As Date
Dim rwdt As WeedRptds.ReportedWeedsDataTable = Nothing

startDate = Date.Parse("01/01/" & year.ToString())
endDate = Date.Parse("12/31/" & year.ToString())

Try
rwdt = Adapter.GetWeedReportsBySourceDate(source, startDate,
endDate)
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
Return rwdt
End Function

The class' Adapter property is:
Imports WeedRptdsTableAdapters ' imports the table adapters for the
class

Private mReportedWeeds As ReportedWeedsTableAdapter

Public ReadOnly Property Adapter() As ReportedWeedsTableAdapter
Get
If mReportedWeeds Is Nothing Then
mReportedWeeds = New ReportedWeedsTableAdapter
End If
Return mReportedWeeds
End Get
End Property

S

Kerry Moorman said:
SAL,

What code are you using to add the parameters?

Kerry Moorman


SAL said:
Bill,
Thanks for helping with my last designer issue. Now, I execute the
following
query in the Query Builder and it returns one record:

SELECT
ReportedWeeds.RID, Weeds.Name, ReportedWeeds.Density,
BioAgents.BName,
ReportedWeeds.Assr_SN, ReportedWeeds.TownRange, ReportedWeeds.LotSize,
ReportedWeeds.theDate, ROW.[Desc] AS RDesc, ReportedWeeds.Owner,
ReportedWeeds.OwnStAddrs, ReportedWeeds.OwnCity, ReportedWeeds.OwnState,
ReportedWeeds.OwnZip, ReportedWeeds.OwnPhone, MethodContacted.[Desc] AS
MDesc, ReportedWeeds.SitusHsnbr + ' ' + ReportedWeeds.SitusStDir + ' ' +
ReportedWeeds.SitusStName + ' ' + ReportedWeeds.SitusSType + ' ' +
ReportedWeeds.SitusCity AS SITADDRS, ReportedWeeds.Source,
ReportedWeeds.SourceCity, ReportedWeeds.SourceState,
ReportedWeeds.SourceStDir,
ReportedWeeds.SourceHsnbr, ReportedWeeds.SourceStName,
ReportedWeeds.SourceZip, ReportedWeeds.SourcePhone,
ReportedWeeds.Comments, ReportedWeeds.FollowUp,
ReportedWeeds.FollowUpNotes,
ReportedWeeds.Atlas

FROM ((((ReportedWeeds LEFT OUTER JOIN
ROW ON ReportedWeeds.ROWID = ROW.ROWID) LEFT OUTER JOIN
Weeds ON ReportedWeeds.WID = Weeds.WID) LEFT OUTER JOIN
MethodContacted ON ReportedWeeds.MCID = MethodContacted.MCID) LEFT OUTER
JOIN
BioAgents ON ReportedWeeds.BioAgent = BioAgents.BAID)

WHERE (ReportedWeeds.Source LIKE '%' + ? + '%') AND
(ReportedWeeds.theDate
= ?) AND (ReportedWeeds.theDate <= ?)

I pass in the following as parameters:
Palmer
1/1/2006
12/31/2006

But, when I execute this same query through the TableAdapter (that was
created via the designer), it returns an error:
The provider could not determine the Double value. For example, the row
was
just created, the default for the Double column was not available, and
the
consumer had not yet set a new Double value.
When I was getting this error before, it was because the SITADDRS column
as
type Double. But, that error went away when I set the type as a string as
it
should have been.

Can anyone help with this maybe???

S
 
S

SAL

I've found the field that's causing the problem but seems goofy ntl:

if the concatenated field for SITADDRS as follows:

ReportedWeeds.SitusHsnbr + ' ' + ReportedWeeds.SitusStDir + ' ' +
ReportedWeeds.SitusStName + ' ' + ReportedWeeds.SitusSType + ' ' +
ReportedWeeds.SitusCity AS SITADDRS

If I remove this field from the query, it runs properly.

Anybody got any ideas on this???

S

SAL said:
Bill,
Thanks for helping with my last designer issue. Now, I execute the
following query in the Query Builder and it returns one record:

SELECT
ReportedWeeds.RID, Weeds.Name, ReportedWeeds.Density, BioAgents.BName,
ReportedWeeds.Assr_SN, ReportedWeeds.TownRange, ReportedWeeds.LotSize,
ReportedWeeds.theDate, ROW.[Desc] AS RDesc, ReportedWeeds.Owner,
ReportedWeeds.OwnStAddrs, ReportedWeeds.OwnCity, ReportedWeeds.OwnState,
ReportedWeeds.OwnZip, ReportedWeeds.OwnPhone, MethodContacted.[Desc] AS
MDesc, ReportedWeeds.SitusHsnbr + ' ' + ReportedWeeds.SitusStDir + ' ' +
ReportedWeeds.SitusStName + ' ' + ReportedWeeds.SitusSType + ' ' +
ReportedWeeds.SitusCity AS SITADDRS, ReportedWeeds.Source,
ReportedWeeds.SourceCity, ReportedWeeds.SourceState,
ReportedWeeds.SourceStDir,
ReportedWeeds.SourceHsnbr, ReportedWeeds.SourceStName,
ReportedWeeds.SourceZip, ReportedWeeds.SourcePhone,
ReportedWeeds.Comments, ReportedWeeds.FollowUp,
ReportedWeeds.FollowUpNotes, ReportedWeeds.Atlas

FROM ((((ReportedWeeds LEFT OUTER JOIN
ROW ON ReportedWeeds.ROWID = ROW.ROWID) LEFT OUTER JOIN
Weeds ON ReportedWeeds.WID = Weeds.WID) LEFT OUTER JOIN
MethodContacted ON ReportedWeeds.MCID = MethodContacted.MCID) LEFT OUTER
JOIN
BioAgents ON ReportedWeeds.BioAgent = BioAgents.BAID)

WHERE (ReportedWeeds.Source LIKE '%' + ? + '%') AND (ReportedWeeds.theDate
= ?) AND (ReportedWeeds.theDate <= ?)

I pass in the following as parameters:
Palmer
1/1/2006
12/31/2006

But, when I execute this same query through the TableAdapter (that was
created via the designer), it returns an error:
The provider could not determine the Double value. For example, the row
was just created, the default for the Double column was not available, and
the consumer had not yet set a new Double value.
When I was getting this error before, it was because the SITADDRS column
as type Double. But, that error went away when I set the type as a string
as it should have been.

Can anyone help with this maybe???

S
 
Top