stack trace while creatting function strings and function string with keywords..

Hii..I are using a user defined function string. and I am
facing problems on creating functions ..like select and
select with lock functions for the tables which has column
names same as keywords.

table:create table newclient(SOURCE varchar(20),SOURCE_ID
int)..
SOURCE is the primarykey..

For select function.. the function string looks like
....
create function string repdef_newclient.rs_select
for my_fun_class
scan 'select * from newclient  where  SOURCE =
?SOURCE!user?'
output language 'select * from newclient where  SOURCE=
?SOURCE!user?'
go

while creating this, the error from repserver is
Msg 29042, Level 12, State 0:
Server 'REP_MAIN':
When parsing the input template, received error: 'Line 2,
character 10: Incorrect syntax with the keyword 'SOURCE'.'
" i coulnd find any error messages for 29042 from any of the
docs"

i tried creating the funtion string by using double and
single quotes on the keyword.. "SOURCE" and 'SOURCE' but
didnt work..
i tried combining both.. "'SOURCE'" the repserver died with
a stack trace..

is there a way to solve this problem..please let me know if
anybody else seen this problem with the work around.

thanks
0
dj
4/5/2004 5:18:03 PM
sybase.rep-server 2969 articles. 1 followers. Follow

2 Replies
739 Views

Similar Articles

[PageSpeed] 22

Did you try double-quoting all the SOURCES...as in...

create function string repdef_newclient.rs_select
	for my_fun_class
	scan 'select * from newclient
		where "SOURCE" = ?"SOURCE"!user?'
	output language 'select * from newclient
		where "SOURCE" = ?"SOURCE"!user?'

dj wrote:

> Hii..I are using a user defined function string. and I am
> facing problems on creating functions ..like select and
> select with lock functions for the tables which has column
> names same as keywords.
> 
> table:create table newclient(SOURCE varchar(20),SOURCE_ID
> int)..
> SOURCE is the primarykey..
> 
> For select function.. the function string looks like
> ...
> create function string repdef_newclient.rs_select
> for my_fun_class
> scan 'select * from newclient  where  SOURCE =
> ?SOURCE!user?'
> output language 'select * from newclient where  SOURCE=
> ?SOURCE!user?'
> go
> 
> while creating this, the error from repserver is
> Msg 29042, Level 12, State 0:
> Server 'REP_MAIN':
> When parsing the input template, received error: 'Line 2,
> character 10: Incorrect syntax with the keyword 'SOURCE'.'
> " i coulnd find any error messages for 29042 from any of the
> docs"
> 
> i tried creating the funtion string by using double and
> single quotes on the keyword.. "SOURCE" and 'SOURCE' but
> didnt work..
> i tried combining both.. "'SOURCE'" the repserver died with
> a stack trace..
> 
> is there a way to solve this problem..please let me know if
> anybody else seen this problem with the work around.
> 
> thanks

0
Jeff
4/5/2004 10:47:29 PM
thanks jeff, it worked :-)

> Did you try double-quoting all the SOURCES...as in...
>
> create function string repdef_newclient.rs_select
>     for my_fun_class
>     scan 'select * from newclient
>         where "SOURCE" = ?"SOURCE"!user?'
>     output language 'select * from newclient
>         where "SOURCE" = ?"SOURCE"!user?'
>
> dj wrote:
>
> > Hii..I are using a user defined function string. and I
> > am facing problems on creating functions ..like select
> > and select with lock functions for the tables which has
> > column names same as keywords.
> >
> > table:create table newclient(SOURCE varchar(20)
> > ,SOURCE_ID int)..
> > SOURCE is the primarykey..
> >
> > For select function.. the function string looks like
> > ...
> > create function string repdef_newclient.rs_select
> > for my_fun_class
> > scan 'select * from newclient  where  SOURCE =
> > ?SOURCE!user?'
> > output language 'select * from newclient where  SOURCE=
> > ?SOURCE!user?'
> > go
> >
> > while creating this, the error from repserver is
> > Msg 29042, Level 12, State 0:
> > Server 'REP_MAIN':
> > When parsing the input template, received error: 'Line 2
> > , character 10: Incorrect syntax with the keyword
> > 'SOURCE'.' " i coulnd find any error messages for 29042
> > from any of the docs"
> >
> > i tried creating the funtion string by using double and
> > single quotes on the keyword.. "SOURCE" and 'SOURCE' but
> > didnt work..
> > i tried combining both.. "'SOURCE'" the repserver died
> > with a stack trace..
> >
> > is there a way to solve this problem..please let me know
> > if anybody else seen this problem with the work around.
> >
> > thanks
>
0
dj
4/6/2004 5:20:47 PM
Reply:

Similar Artilces:

PL/SQL String Functions vs VB String Functions
The app I have in mind will need to take user entered strings - some as long as 3 or 4 sentences - and parse the string for key words. The key words being looked for would be stored in a table. After the key words are located in the user entered string, a URL will be built to display on a web page linking a user to a ecommerce site. I don't know too much about how Oracle stored procedures and functions can be used to manipulate strings of numbers and text. From what little I've seen, I'm guessing that I should probably rely on VB string functions and asp.net to get the job ...

Any function that replaces all occurences of one string in a given string with another third string?
Is there any function that replaces all occurences of one string in a given string with another third string?(Something that works similar to REPLACE() in MS-SQL Server) If not, can anything similar can be worked out somehow using T-SQL? Thanks in advance Replacing single instances can be done with the stuff function. So multiple occurrences can be done with a while loop: declare @CR char (1) select @CR = char (13) -- Carriage Return ... while (exists (select * from #rules where ch...

function string rep
i am trying to set an replication using function strings . Need help on that.have not configured this before . need the steps as to what we need to create 1st before when define the "function string" . connections are configured. rep defs /subs are present . Normal rep is working fine . created a dummy table with rep /defs and its working . Need to knwo how to config function strings replication . Had tried the below . 1 .create function string class <class_name> 2.create error class <class_name> 3.create function string repdef.rs_update,rs_insert and ...

dynamic mask-string for string function
Hello Group, I'm still using PB6.5. This is my question: Can I dynamically define a mask-string and give it as an argument to the PB-string-function? string(mystring,"#,##0.00") vs. string ls_mask ls_mask = "#,##0.00" string(mystring, ls_mask) My purpose is: I want to convert the content of a datawindow into text (saveas is not an option). Therefor I'm checking the coltype of the column I'm working at. Unfortunately the coltype will be 'decimal(x)' for all numeric-fields in the db. I found a way to determine the number of the dec...

How to call a javascript function with string as a parameter in string builder
Hi to all  How to call a javascript function with string as a parameter  in string builder Example strBud.AppendFormat("<a class='HeaderLink1' onclick='passvalue(‘" & dSet.Tables(0).Rows(i).Item("Name") & "’);'>") When the page is load it show syntax error message. So help me out how can I call the function with string as a parameter.   strBud.AppendFormat("<a class='HeaderLink1' onclick=passvalue(‘" & dSet.Tables(0).Rows(i).Item("Name") & "’);>&qu...

Can i call a function that the function name store in a string?
plan to locate the function name at Web.config or App.config to avoid frequence upload then can i call that function in my back code? example of the function name is : exfunc(string a,string b) so i use a string to store it : string funcname =  exfunc(string a,string b) then how to call the function? thanks for helpC#######################################  Better that make a class library to store your functionsWe All move to our original place.Don't forget.Imran Baloch Storing function name in web.config is bad practice. Always better is class library Do ...

string function
I want to format a decimal value with the string function. the returned string should be rigth justified and always have the same length, but there are no leading blanks returned. eg: ls_str = "Value: " ls_str += string(ld_value, "###,##0.00") with 25.3 ls_str is "Value: 25.30" with 1005.4 ls_str is "Value: 1,005.40" what i want: "Value: 25.30" "Value: 1005. 40 I'm sure there are hundred's ways to do that. Try this one: ls_str = "Value: " ls_str ...

String Functions
What's a string function for replicating a char or string like "X" or "-=<*>=-" N times. Thanks.Please mark the post(s) that have helped you as "Answer" Dim MyPaddedString As String Dim PadChar As Char = "X"c MyPaddedString = "".PadLeft(10,PadChar) If you want to pad using a string, instead of char, I'd suggest using a StringBuilder. Hope that helps, Wim Wim Hollebrandse---http://www.zealandit.com...

Function functionality ?
Hello, I have a Function : create Function F1 ........ as update T1 set col1=col1+1; commit; return col1; end; Lets say col1 value before the func. is called is 100. Now, if user1 executes this function and user2 also executes the same function, at the same time. 1) What value is returned for user1 and user2. Would that update stt. locks the table, and allows only 1 user to access it? 2) My requiemnent is that the 2 users should get different values from the function. thanks for your help -Sravan Sravan wrote... > Hello, > I have a F...

function string
Is it posible to make one generic function string so future made replication definitions all resolve their function considering this generic function string. I'm especially thinking of the insert update and delete functions. What I want to do is, change all the modifications send by replication to the destiny DB into stored procedures that inserts into a table the basic data of the modifications. The table for example consists of the following fields. table char (30) , modification char(1), fields (text), values (text). In which table is the name of the table changed, modif...

function from string
Hi. Is there a way to get a function from a string? something like: //Default.aspx void functionA(int a, int b){} void functionB(int a, int b){} //WebUserControl.ascx void callfunction(Page page){ page.find_function("functionA").call(3,4); page.find_function("functionB").call(5,1); } The thing is that I need to set a functionName to a ascx, because inside ascx I must call the user-defined function I tried width 'delegate', but I think that delegate can use only with the name-known functions As you see in the example, I need so...

string functions
hi all    can anyone tell me what is the difference between using   string.empty   and string variable = ""   i have googled but i dint satisfied with the answers which i got..   thanks  chithra...

SQL Server 2000 String Functions
 Hi Guys,I have a littel problem.Using SQL Server 2000:Text identifier for the first 6 columns are double quotes ("). Fromthen on the potential columns (between 8 and 14) are without the double quotes.Nevertheless, all potential columns are seperated by a single space.Example:--------Column0------------------------------------------------------------------------------------------------------"High" "Log" "Key" "Test" "Big" "watch"  12 35 65 78 32 77 No 232 677 53,4 99 05 32"High" "Log" "Key&quo...

String functions
Hi, I would like to know if there are any libraries that i can use (without using PFC) that contains functions/objects for string manipulation more complete than the ones that come with PowrBuilder. Thank you very much, Antonio. -- Antonio Volpon - http://laika.nline.it/users/volpon/ mailto:volpon@nline.it In article <01bd518d$dae4aca0$4a00a482@antonio>, volpon@nline.it says... > Hi, > I would like to know if there are any > libraries that i can use (without using PFC) > that contains functions/objects > for string manipul...

Web resources about - stack trace while creatting function strings and function string with keywords.. - sybase.rep-server

Resources last updated: 12/5/2015 9:12:41 PM