|
Home > Archive > SQL Anywhere Mobile > August 2005 > log ri violations
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| Am using the below SP to log rows deleted.
Taken from the online sample.
I get an Error (-157) in my sync that "can not convert ml.staff to a
timestamp".
The value ml.staff is the user that connects for the sync.
I dont get why the name is being inserted into the value column...
CREATE TABLE "DBA"." LogRIErrorTable "
(
"id" int PRIMARY KEY NOT NULL,
"name" varchar(255) NOT NULL,
"value" timestamp NOT NULL
)
ALTER PROCEDURE "DBA"." sp_hook_dbmlsync_dow
nload_log_ri_violati
on"()
begin
--
-- get the next id for the LogRIErrorTable
--
declare nextid integer;
select max(id) into nextid
from LogRIErrorTable;
if nextid is null then
set nextid=0
else
set nextid=nextid+1
end if;
insert into LogRIErrorTable( id,name,value)
select nextid,#hook_dict.name,#hook_dict.value from
#hook_dict
end
| |
| Greg Fenton 2005-08-25, 3:37 am |
| MJN wrote:
> Am using the below SP to log rows deleted.
> Taken from the online sample.
> I get an Error (-157) in my sync that "can not convert ml.staff to a
> timestamp".
> The value ml.staff is the user that connects for the sync.
The SP below seems completely unrelated to the error above. Where are
you seeing the above error, in the dbmlsync or the dbmlsrv9 console?
Why do you think the error is related to the SP code?
> declare nextid integer;
> select max(id) into nextid
> from LogRIErrorTable;
Why not declare the ID column as a DEFAULT AUTOINCREMENT?
The above code is strongly discouraged as a way of producing a primary
key value.
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/
| |
| David Fishburn 2005-08-27, 1:23 pm |
| "MJN" < SpamFilterOnlychuck1
rar@yahoo.com> wrote in news:430c15ee$1@foru
ms-
2-dub
of sybase.public.sqlanywhere.mobilink:
M> Am using the below SP to log rows deleted.
M> Taken from the online sample.
M> I get an Error (-157) in my sync that "can not convert ml.staff to a
M> timestamp".
M> The value ml.staff is the user that connects for the sync.
Start up Sybase Central and use the stored procedure debugger. Set a
breakpoint in that stored procedure.
While in the debugger, cut and paste your select statement and use the
Debug menu to Execute the same command. You just need to isolate which
statement is causing the problem. The nice thing, is while in the
debugger you can modify the select statement since you are active on
that connection until you get it right. Then you can modify the
procedure with the correct one.
--
David Fishburn
Certified ASA Developer Version 8
iAnywhere Solutions - Sybase
Professional Services
Please only post to the newsgroup
Please ALWAYS include version and MORE importantly BUILD number with
EACH post (dbeng9 -v).
EBFs and Maintenance Releases
http://downloads.sybase.com/swx/sdmain.stm
Developer Community / Whitepapers
http://www.ianywhere.com/developer
CaseXpress - to report bugs
http://casexpress.sybase.com
CodeXchange - Free samples
[url]http://ianywhere.codexchange.sybase.com/servlets/ ProjectDocumentList[
/url]
|
|
|
|
|