ODBC Test returns error

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
thomasschmeidl
Posts: 166
Joined: Sat Apr 15, 2006 2:14 pm
Location: Germany, Bavaria

ODBC Test returns error

Post by thomasschmeidl »

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
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

I suppose, you are using ODBC test to access MS SQL Server database, right? Could you provide exact SQL sentence here?

Regards,
Max
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Re: ODBC Test returns error

Post by KS-Soft Europe »

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'"
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].

Regards,
Max
thomasschmeidl
Posts: 166
Joined: Sat Apr 15, 2006 2:14 pm
Location: Germany, Bavaria

Post by thomasschmeidl »

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
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

thomasschmeidl wrote:- The statement is: Select HoAktUser from HoHospitalisation where ((HoAktUser='GATEWAY') and (Datediff(mi,Hoakt,Getdate())<15))
Perhaps, you should specify database name in conjunction with tablename, e.g.: somedatabase..HoHospitalisation
It might help.
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?
Yes, very strange. Here should not be any difference.

BTW. What version of HostMonitor do you use?

Regards,
Max
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

HostMonitor is running as application? Or service? May be you have started 2 instances of HostMonitor: one is running as service, while you are using second instance to modify tests?

Regards
Alex
thomasschmeidl
Posts: 166
Joined: Sat Apr 15, 2006 2:14 pm
Location: Germany, Bavaria

Post by thomasschmeidl »

We use HM 6.10 running as a service and access HM only by RCC.

Specifying the name of the database to the table-name was the solution!!!

Thanks a lot

Thomas
Post Reply