OS: W2003 HM 6.10 SQL-Server 2000
I set up an ODBC SQL test which performs fine as long as I test the SQL-Statement in the ODBC-SQL-Test-dialog (Message: "Query executed, Value in the field specified: GATEWAY").
Refreshing the test in the test list pane it produces the error: "[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid Object Name 'HoHospitalisation'"
Using exactly the same SQL-Statement in the SQL Query analyzer everything is ok.
I've made some screenshots - if you tell me where to send them to I will do so.
Any idea?
Regards
Thomas
ODBC Test returns error
-
- Posts: 166
- Joined: Sat Apr 15, 2006 2:14 pm
- Location: Germany, Bavaria
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Re: ODBC Test returns error
I think, you should try to rewrite SQL sentence into single line (remove #13#10 chars), and enclose the table name into the brackets, e.g. [Hospitalisation].thomasschmeidl wrote:Refreshing the test in the test list pane it produces the error: "[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid Object Name 'HoHospitalisation'"
Regards,
Max
-
- Posts: 166
- Joined: Sat Apr 15, 2006 2:14 pm
- Location: Germany, Bavaria
Hello again,
- The database is a MSSQL2000 Server
- The statement is: Select HoAktUser from HoHospitalisation where ((HoAktUser='GATEWAY') and (Datediff(mi,Hoakt,Getdate())<15))
- There are no CR/LFs in the statement
- Enclosing the table name into brackets doesn't help.
It's really strange: When I test the test it works, but when I apply it, it doesn't.
What is the difference?
Regards
Thomas
- The database is a MSSQL2000 Server
- The statement is: Select HoAktUser from HoHospitalisation where ((HoAktUser='GATEWAY') and (Datediff(mi,Hoakt,Getdate())<15))
- There are no CR/LFs in the statement
- Enclosing the table name into brackets doesn't help.
It's really strange: When I test the test it works, but when I apply it, it doesn't.
What is the difference?
Regards
Thomas
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Perhaps, you should specify database name in conjunction with tablename, e.g.: somedatabase..HoHospitalisationthomasschmeidl wrote:- The statement is: Select HoAktUser from HoHospitalisation where ((HoAktUser='GATEWAY') and (Datediff(mi,Hoakt,Getdate())<15))
It might help.
Yes, very strange. Here should not be any difference.thomasschmeidl wrote:It's really strange: When I test the test it works, but when I apply it, it doesn't.
What is the difference?
BTW. What version of HostMonitor do you use?
Regards,
Max
-
- Posts: 166
- Joined: Sat Apr 15, 2006 2:14 pm
- Location: Germany, Bavaria