[cvsnt] 2.5.03.2151: MS SQLServer and audit trigger error

Joe Enfield joeenfield at hotmail.com
Sat Nov 18 14:36:13 GMT 2006


OK - I have a SWAG:

Looking up the SqlServer Error - I found this Answer to someone elses 
question:
There are four parameters (the '?') you only set 3. It wouldn't surprise me 
if this is your problem.

Although I am not a C programmer, I've looked at the code and come up with 
this...


The message line looks like it ensures there is a value to 'bind' with.
The diff line does not ensure there is a value.  If I have diff values being 
persisted, and one of the commits does not have any diffs associated with 
it, would this fail?

   g_pDb->Bind(0,message?message:"");
   g_pDb->Bind(1,diff);   <========= Should this line be like the line 
above?
   if(g_AuditLogSessions)
    g_pDb->Execute("Insert Into %s (SessionId, Directory, Message, Type, 
Filename, Tag, BugId, OldRev, NewRev, Added, Removed, Diff) Values (%lu, 
'%s', ? ,'%c','%s','%s','%s','%s','%s',%lu, %lu, ? )",
     tbl.c_str(),g_nSessionId,NULLSTR(directory),change_list[n].type,NULLSTR(change_list[n].filename),NULLSTR(change_list[n].tag),NULLSTR(change_list[n].bugid),NULLSTR(change_list[n].rev_old),NULLSTR(change_list[n].rev_new),added,removed);


Thank you,
Joe E.

"Joe Enfield" <joeenfield at hotmail.com> wrote in message 
news:ejkjlg$n92$1 at paris.nodomain.org...
> This error still occurs for me.
> Does anyone else have the same experience?
> Could this be caused by a general SQLServer setting (such as the 'no 
> count' property being set or not set?)
>
> Any Information would be appreciated.
> Joe E.
>
> "Joe Enfield" <joeenfield at hotmail.com> wrote in message 
> news:dkglds$58o$1 at paris.nodomain.org...
>> on a test server with build 2141, I created a SQLServer database, and 
>> turned
>> on auditing.
>>
>> after a commit:
>> ------------------------
>> audit_trigger error (loginfo): [Microsoft][ODBC SQL Server Driver]COUNT
>> field incorrect or syntax error
>>
>> Success, CVS operation completed
>> -------------------------
>>
>> Looks like other information is getting to the data base tables.
>> SessionLog, and HistoryLog have quite a bit of info
>> Commit log has one entry, after two commits against three files.
>>
>> Thank you
>> Joe E.
>>
>>
>>
>>
>>
>>
>>
>
> 




More information about the cvsnt mailing list