K
Kstro
Hi,
This might be a .Net question but I thought I'd ask anyway.
The following query returns 46 rows if run as an access query but no rows if
the same SQL string is used form within VB.Net.
Go figure...I've spent 2 hours on this.
Any help?
Thanks.
From ACCESS:
SELECT instrSec, AssignNAME, ItemName, FullName, CMP_EOW FROM 032Portfolios
, MMLBenchMarks where AssignNAME = ItemName GROUP BY instrSec, AssignNAME,
ItemName, FullName, CMP_EOW HAVING (((MMLBenchMarks.CMP_EOW)=7 Or
(MMLBenchMarks.CMP_EOW)=6)) and instrSec like('*CMP*') order by FullName
From .Net:
Dim strSqlCMP As String
strSqlCMP = "SELECT instrSec, AssignNAME, ItemName, FullName, CMP_EOW FROM
032Portfolios , MMLBenchMarks where AssignNAME = ItemName GROUP BY instrSec,
AssignNAME, ItemName, FullName, CMP_EOW HAVING (((MMLBenchMarks.CMP_EOW)=7 Or
(MMLBenchMarks.CMP_EOW)=6)) and instrSec like('*CMP*') order by FullName"
Dim objCMP As New OleDbDataAdapter(strSqlCMP, conn)
objCMP.Fill(ds, "ds_OnTimeCMPNames")
This might be a .Net question but I thought I'd ask anyway.
The following query returns 46 rows if run as an access query but no rows if
the same SQL string is used form within VB.Net.
Go figure...I've spent 2 hours on this.
Any help?
Thanks.
From ACCESS:
SELECT instrSec, AssignNAME, ItemName, FullName, CMP_EOW FROM 032Portfolios
, MMLBenchMarks where AssignNAME = ItemName GROUP BY instrSec, AssignNAME,
ItemName, FullName, CMP_EOW HAVING (((MMLBenchMarks.CMP_EOW)=7 Or
(MMLBenchMarks.CMP_EOW)=6)) and instrSec like('*CMP*') order by FullName
From .Net:
Dim strSqlCMP As String
strSqlCMP = "SELECT instrSec, AssignNAME, ItemName, FullName, CMP_EOW FROM
032Portfolios , MMLBenchMarks where AssignNAME = ItemName GROUP BY instrSec,
AssignNAME, ItemName, FullName, CMP_EOW HAVING (((MMLBenchMarks.CMP_EOW)=7 Or
(MMLBenchMarks.CMP_EOW)=6)) and instrSec like('*CMP*') order by FullName"
Dim objCMP As New OleDbDataAdapter(strSqlCMP, conn)
objCMP.Fill(ds, "ds_OnTimeCMPNames")