Alex,
I downloaded the file and now I am using HM 3.65
Tried, but same error "Incorrect Syntax near 'emmWirelessType_EwnIDFK' with and without SQLFetch... option.
SQL query does not run via host monitor
Ok, I found what was wrong. HostMonitor makes one line from multiline query. But HM just removed 0A and 0D characters and did not insert spaces. My testing multiline requests work because I usually use space in first position for any line except first. Very simple error, I just had to look into right place
Thanks
Update available at http://www.ks-soft.net/download/hm366.zip
Regards
Alex

Update available at http://www.ks-soft.net/download/hm366.zip
Regards
Alex
Hi Alex,
I think the code needs a little bit of tweeking. If you have a couple of lines of SQL code in HM, it removes the space between the lines. For example, the code
select * from tbl1
where a = 1
will become
select * from tbl1where a = 1
to test it, enter few lines of code in HM, then do a cut/paste in notepad without word wrap and you will know what I am referring to.
If I have a code that works in other ODBC applications, should it always work in HM as well, or are there some exceptions ? Should the following work in HM ?
declare @counter1 int,@counter2 int
set @counter1 = (select count(*) from tbl1..tblWooWorkorder)
set @counter2 =(select * from openrowset('SQLOLEDB','ServerName';'username';'password',
'SELECT count(*) FROM tbl2.dbo.tblWooWorkorder ') )
if @counter1 = @counter2
begin
print 0
end
else
begin
print 1
end
I think the code needs a little bit of tweeking. If you have a couple of lines of SQL code in HM, it removes the space between the lines. For example, the code
select * from tbl1
where a = 1
will become
select * from tbl1where a = 1
to test it, enter few lines of code in HM, then do a cut/paste in notepad without word wrap and you will know what I am referring to.
If I have a code that works in other ODBC applications, should it always work in HM as well, or are there some exceptions ? Should the following work in HM ?
declare @counter1 int,@counter2 int
set @counter1 = (select count(*) from tbl1..tblWooWorkorder)
set @counter2 =(select * from openrowset('SQLOLEDB','ServerName';'username';'password',
'SELECT count(*) FROM tbl2.dbo.tblWooWorkorder ') )
if @counter1 = @counter2
begin
print 0
end
else
begin
print 1
end
>to test it, enter few lines of code in HM, then do a cut/paste in notepad without word wrap and you will know what I am referring to.
Please, check my message above. There is patch available
>Should the following work in HM ?
I don't know, it depends on driver and server. HostMonitor does not care about syntax of the query. It just send ONE statement to ODBC driver and get responce.
Regards
Alex
Please, check my message above. There is patch available

>Should the following work in HM ?
I don't know, it depends on driver and server. HostMonitor does not care about syntax of the query. It just send ONE statement to ODBC driver and get responce.
Regards
Alex