unterminated string error

unterminated string error

Post by Thot » Wed, 09 Jan 2002 11:15:15



HI,

Can any one help me , how can i get rid of this error.
In my VB DLL I am calling a sybase stored procedure which
has two parameters. like this

strsql = "call sp_name 12 , 'Thota SRidhar (IL) '".
cnn.execute(strsql)

(May be syntax is not correct here)

If I pass paranthesis in a parameter it is failing and
giving the error message as unterminated string constant.
If I remove the paranthesis , it is excuting perfectly.

Is it the problem of ADO or sybase.  I cannot remove the
braket from the parameter. Please help me in this regard.
I am using ADO 2.6 and sybase 11.0

Thanks
Thota

 
 
 

unterminated string error

Post by Val Mazu » Wed, 09 Jan 2002 22:02:06


Hi,

Try to use EXEC or EXECUTE instead of CALL.

strsql = "exec sp_name 12 , 'Thota SRidhar (IL) '".

It should work,

Val

Quote:>-----Original Message-----
>HI,

>Can any one help me , how can i get rid of this error.
>In my VB DLL I am calling a sybase stored procedure which
>has two parameters. like this

>strsql = "call sp_name 12 , 'Thota SRidhar (IL) '".
>cnn.execute(strsql)

>(May be syntax is not correct here)

>If I pass paranthesis in a parameter it is failing and
>giving the error message as unterminated string constant.
>If I remove the paranthesis , it is excuting perfectly.

>Is it the problem of ADO or sybase.  I cannot remove the
>braket from the parameter. Please help me in this regard.
>I am using ADO 2.6 and sybase 11.0

>Thanks
>Thota

>.


 
 
 

unterminated string error

Post by Thot » Thu, 10 Jan 2002 01:12:09


Thank you very much Val,
Can you explain me what is teh difference between Call and
EXEC statments.

Thank you so much
Thota

Quote:>-----Original Message-----
>Hi,

>Try to use EXEC or EXECUTE instead of CALL.

>strsql = "exec sp_name 12 , 'Thota SRidhar (IL) '".

>It should work,

>Val

>>-----Original Message-----
>>HI,

>>Can any one help me , how can i get rid of this error.
>>In my VB DLL I am calling a sybase stored procedure
which
>>has two parameters. like this

>>strsql = "call sp_name 12 , 'Thota SRidhar (IL) '".
>>cnn.execute(strsql)

>>(May be syntax is not correct here)

>>If I pass paranthesis in a parameter it is failing and
>>giving the error message as unterminated string
constant.
>>If I remove the paranthesis , it is excuting perfectly.

>>Is it the problem of ADO or sybase.  I cannot remove the
>>braket from the parameter. Please help me in this
regard.
>>I am using ADO 2.6 and sybase 11.0

>>Thanks
>>Thota

>>.

>.

 
 
 

unterminated string error

Post by Val Mazu » Thu, 10 Jan 2002 01:55:31


Hi,

EXECUTE, short form of it, EXEC calls stored procedure to
run. As I know CALL is specific some dialects of SQL (Like
Watcom-SQL). Actually you do not need specify EXEC at all,
if you are using Command object to execute it. What you
need to do is to specify type of command as adCmdStoredproc

Val

Quote:>-----Original Message-----
>Thank you very much Val,
>Can you explain me what is teh difference between Call
and
>EXEC statments.

>Thank you so much
>Thota
>>-----Original Message-----
>>Hi,

>>Try to use EXEC or EXECUTE instead of CALL.

>>strsql = "exec sp_name 12 , 'Thota SRidhar (IL) '".

>>It should work,

>>Val

>>>-----Original Message-----
>>>HI,

>>>Can any one help me , how can i get rid of this error.
>>>In my VB DLL I am calling a sybase stored procedure
>which
>>>has two parameters. like this

>>>strsql = "call sp_name 12 , 'Thota SRidhar (IL) '".
>>>cnn.execute(strsql)

>>>(May be syntax is not correct here)

>>>If I pass paranthesis in a parameter it is failing and
>>>giving the error message as unterminated string
>constant.
>>>If I remove the paranthesis , it is excuting perfectly.

>>>Is it the problem of ADO or sybase.  I cannot remove
the
>>>braket from the parameter. Please help me in this
>regard.
>>>I am using ADO 2.6 and sybase 11.0

>>>Thanks
>>>Thota

>>>.

>>.

>.

 
 
 

unterminated string error

Post by Thot » Thu, 10 Jan 2002 04:05:32


Thanks Val,
You did a great job for me.
Thanks a lot!!!
Thota

Quote:>-----Original Message-----
>Hi,

>EXECUTE, short form of it, EXEC calls stored procedure to
>run. As I know CALL is specific some dialects of SQL
(Like
>Watcom-SQL). Actually you do not need specify EXEC at
all,
>if you are using Command object to execute it. What you
>need to do is to specify type of command as
adCmdStoredproc

>Val

>>-----Original Message-----
>>Thank you very much Val,
>>Can you explain me what is teh difference between Call
>and
>>EXEC statments.

>>Thank you so much
>>Thota
>>>-----Original Message-----
>>>Hi,

>>>Try to use EXEC or EXECUTE instead of CALL.

>>>strsql = "exec sp_name 12 , 'Thota SRidhar (IL) '".

>>>It should work,

>>>Val

>>>>-----Original Message-----
>>>>HI,

>>>>Can any one help me , how can i get rid of this error.
>>>>In my VB DLL I am calling a sybase stored procedure
>>which
>>>>has two parameters. like this

>>>>strsql = "call sp_name 12 , 'Thota SRidhar (IL) '".
>>>>cnn.execute(strsql)

>>>>(May be syntax is not correct here)

>>>>If I pass paranthesis in a parameter it is failing and
>>>>giving the error message as unterminated string
>>constant.
>>>>If I remove the paranthesis , it is excuting
perfectly.

>>>>Is it the problem of ADO or sybase.  I cannot remove
>the
>>>>braket from the parameter. Please help me in this
>>regard.
>>>>I am using ADO 2.6 and sybase 11.0

>>>>Thanks
>>>>Thota

>>>>.

>>>.

>>.

>.

 
 
 

1. Char with ASCII value 0 causes unterminated string constant

Hi All,

I have a routine that encrypts credit card numbers and inserts them into a
table.
The MD5 encryption occasionally causes the Insert statement to crash when
one of the characters in the encrypted number is a ASCII value of 0 (looks
like a space).  Error is Unterminated string etc...

Is there a delimiter we could use similar to double quotes ('') in place of
single quotes (')?
Or any other technique?

Regards,

Seth Bell,
Applications Developer,
Xref Pty Limited.

http://www.xref.com.au

2. Faxing from VFP

3. [INTERFACES] JDBC 'Unterminated quoted string'

4. Only want trigger to fire after multiple inserts/updates are done...help!

5. Unterminated /* comment

6. insert error - help

7. making an app unterminating?

8. Linking several tables at the same time

9. Prob w/ feeding fixed-length, unterminated data into sqllloader

10. Get error when affect a String Field in a string var

11. DTS Error-2147217887 (80040E21) Error string: Errors occurred

12. ORA-04030 out of process memory when trying to allocate string bytes (string,string)

13. select error with null string -- error code -209