KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

ODBC logging failes with a ' char

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
plambrecht



Joined: 19 May 2004
Posts: 151
Location: Belgium

PostPosted: Mon Dec 20, 2004 3:36 am    Post subject: ODBC logging failes with a ' char Reply with quote

Alex,

In my system log, I sometimes get this error:
Code:
20/12/2004 4:20:44 ODBC log error. Error code: 4294967295 ([Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'Transaction'.) Logging initiated by "ICORDA-FS2, Eventlog Application Warning" test.

Code:
18/12/2004 4:20:16   ODBC log error. Error code: 4294967295 ([Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'Computer'.) Logging initiated by "ICORDA-FS2, Eventlog Application Error" test. 

I Use Advance ODBC logging with this Query:
Code:
Insert into RawTestData (DeviceID, DataTestID, TestDate, TestValue, TestIntegerValue, TestStatus, TestExtra1) VALUES ('%FCommentLine4%', '%CommentLine1%', GetDate(), '%Reply_CStyle%', '%Reply_Integer%', '%StatusID%', '%CommentLine2%')


the Reply I have for the test is this one:
Code:
SQL Server Scheduled Job 'Transaction Log Backup Job for DB Maintenance Plan 'DB Maintenance Plan1'' (0x77CF9071E1680343A3FD2E31BF338C08) - Status: Failed - Invoked on: 2004-12-20 00:00:00 - Message: The job failed. The Job was invoked by Schedule 19 (Schedule 1). The last step to run was step 1 (Step 1).

Code:
'Computer Associates Licensing -39WC - License Failure. Please contact your account representative to obtain a new license. LRF=39WC, 00025507e53c, PC_1586_2_2394, ICORDA-FS2, 3'



The problem is that with Microsoft SQL a single quote has to be replace with two single quotes and not a backslashed single quote...

Pieter
Back to top
View user's profile Send private message Visit poster's website
plambrecht



Joined: 19 May 2004
Posts: 151
Location: Belgium

PostPosted: Tue Dec 21, 2004 5:01 pm    Post subject: Reply with quote

Hi,

An ideas ?

Pieter
Back to top
View user's profile Send private message Visit poster's website
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Tue Dec 21, 2004 5:10 pm    Post subject: Reply with quote

Ideas? Not yet (except another new variable). Trying to find MS SQL manual that describes all SQL rules...

Reards
Alex
Back to top
View user's profile Send private message Visit poster's website
plambrecht



Joined: 19 May 2004
Posts: 151
Location: Belgium

PostPosted: Wed Dec 22, 2004 2:32 am    Post subject: Reply with quote

maybe a start here :

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csvr2002/htm/cs_rp_oledb_dktu.asp
* A single quote must be escaped with another single quote.
* A double quote does not need to be escaped with another double quote unless the query is in Visual Basic Scripting Edition (VBScript) code.

or here
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvbpj00/html/sqlado.asp


greetz

Pieter
Back to top
View user's profile Send private message Visit poster's website
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Thu Jan 06, 2005 12:32 pm    Post subject: Reply with quote

Ok, this update should fix the problem: www.ks-soft.net/download/hm494.zip

This is "unofficial" update, means there are some undocumented modifications. It was tested and seems to be working fine but it was not tested much. So, better if you keep your eyes on it for a while.

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index