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

Using quote charactes in ODBC

 
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: Tue May 25, 2004 5:50 am    Post subject: Using quote charactes in ODBC Reply with quote

Hi,

When performing test's, I have some test that have the single quote character in them.
All tests are logged in ODBC using this query :

Insert into hmlog (eventtime, testname, status, reply, comment1, testmethode) VALUES ('%DateTime%', '%TestName%', '%Status%', '%Reply%', '%CommentLine1%', '%TestMethod%')

This is what I get in the systemlog of HM: (erased the password)
25/05/2004 13:30:36 ODBC log error. Error code: 4294967295 ([Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression ''Connect to d'Light', 'Bad', '14', '[C:\Program Files\Cisco Systems\VPN Client\vpnclient.exe] connect d'light user icorda pass ****''.) Logging initiated by "Connect to d'Light" test.

Can I somehow change it so that the ' characters are preceded with a \ when putting into the SQL query ?
My guess is that this is a programmatic issue, and not a config issue.

regards

Pieter

PS: the default sql query string is missing ' around %datetime%
Back to top
View user's profile Send private message Visit poster's website
KS-Soft



Joined: 03 Apr 2002
Posts: 12792
Location: USA

PostPosted: Wed May 26, 2004 10:46 am    Post subject: Reply with quote

Quote:
Can I somehow change it so that the ' characters are preceded with a \ when putting into the SQL query ?


Sorry, you cannot do that. We will try to improve this function in next version.
Probably you may use ` (character #96) instead of ' (character #39) in test name.

Quote:
PS: the default sql query string is missing ' around %datetime%


Thanks for the tip.

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