Re: Help with TableAdapter
- From: "SAL" <SAL_@xxxxxxxx>
- Date: Fri, 6 Apr 2007 08:20:48 -0700
No I don't but I'm confused as to how that would that help?
S
"Cor Ligthert [MVP]" <notmyfirstname@xxxxxxxxx> wrote in message
news:OS0WWOAeHHA.1868@xxxxxxxxxxxxxxxxxxxxxxx
Sal,
Do you have option strict on in top of your program?
Cor
"SAL" <SAL_@xxxxxxxx> schreef in bericht
news:%23OdwR57dHHA.1216@xxxxxxxxxxxxxxxxxxxxxxx
Hi Mike,
Here's the query:
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 <= ?)
What I found was that the concatenated field was causing the problem. I'm
thinking that Access thinks the + character is for adding numbers (i.e.,
double) and that's what's producing the error. However, if I change the
concatenation to characters Access likes to use (i.e., the ampersand and
the double quote), then the designer doesn't like that. So, it's like a
catch 22 here. What I'm doing in the interim is just including the fields
and concatenating the values for those fields and passing it to my
reports. Ugly but it's working for now. I would love to have it work like
it's supposed to..
Thanks for looking
S
"Mike McIntyre" <mikemc@xxxxxxxxxxxxxxxxx> wrote in message
news:e0QGFtydHHA.4656@xxxxxxxxxxxxxxxxxxxxxxx
Can you send the query with the problem so it can be inspect or
correctness?
--
Mike
Mike McIntyre [MVP]
http://www.getdotnetcode.com
"SAL" <SAL_@xxxxxxxx> wrote in message
news:%2381XKntdHHA.2268@xxxxxxxxxxxxxxxxxxxxxxx
Hello,
Using the designer in my project, I created a DataTable for one of the
tables in an Access database. I created a TableAdapter for that
DataTable by adding queries. For the most part, the queries are
executing correctly but this one does not return any rows. If I past
the sql into the Access database from the TableAdapter, it returns
rows. Does anyone know how to debug what the command is sending to the
Access database for any particular query?
This query uses parameters and I'm afraid it's not sending the where
clause correctly..
Any help with this would be much appreciated
S
.
- Follow-Ups:
- Re: Help with TableAdapter
- From: Cor Ligthert [MVP]
- Re: Help with TableAdapter
- References:
- Help with TableAdapter
- From: SAL
- Re: Help with TableAdapter
- From: Mike McIntyre
- Re: Help with TableAdapter
- From: SAL
- Re: Help with TableAdapter
- From: Cor Ligthert [MVP]
- Help with TableAdapter
- Prev by Date: Re: Help with TableAdapter
- Next by Date: Re: Microsoft SQL Server 2005 Express
- Previous by thread: Re: Help with TableAdapter
- Next by thread: Re: Help with TableAdapter
- Index(es):
Relevant Pages
|