SQL Test Failed

General chat about HostMonitor (all messages posted before March 07, 2003 available here).
Locked
nettocc
Posts: 3
Joined: Thu Jun 12, 2003 6:00 pm

Post by nettocc »

when i try to test my odbc connection, a error appears:
return code:4294967295
[microsoft][odbc sql server driver][sql server]line 1:bad syntax nearby of '.2003'.

has onyone a idea?
thx

Reto
KS-Soft
Posts: 12869
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Some error in SQL Query. But nobody will be able to say what's wrong until you provide this query. Could you please provide it?

Regards
Alex
nettocc
Posts: 3
Joined: Thu Jun 12, 2003 6:00 pm

Post by nettocc »

hi
the sql query test works now. but in the filed 'date' he allwys shows the date of 1.1.1900.
However, here ist the query
Insert into hmlog(datetime, testname, status, reply) VALUES (%DATE%,'%TestName%', '%Status%', '%Reply%')

in the table the field 'date' has the format: MM/dd/yyyy and in the table is the fatetyp 'DATETIME'.

thank you verymuch.

reto
User avatar
Marcus
Posts: 367
Joined: Mon Nov 18, 2002 6:00 pm

Post by Marcus »

Remove the format of the datefield and you should see the correct value.
nettocc
Posts: 3
Joined: Thu Jun 12, 2003 6:00 pm

Post by nettocc »

Sorry, that doesn't works.

under miscellaneous i have disabled the box "use fixed Date&Time formats", but the date is still 1.1.1900.
The datetyp in the sql-table is "datetime" with 8 chars.

regards
reto
User avatar
Marcus
Posts: 367
Joined: Mon Nov 18, 2002 6:00 pm

Post by Marcus »

If you use this exact statement:
Insert into hmlog(datetime, testname, status, reply) VALUES (%DATE%,'%TestName%', '%Status%', '%Reply%')

You need to ad the quotes for the %DATE% macro variable.

We use the %datetime% macro.

<font size=-1>[ This Message was edited by: Marcus on 2003-06-17 09:37 ]</font>
Locked