Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

ANSI_STRING Option

3 posts in General Discussion Last posting was on 2007-01-16 16:05:00.0Z
Neelam Chakrabarty Posted on 2007-01-15 22:56:59.0Z
From: "Neelam Chakrabarty" <neelam_chakrabarty@intuit.com>
Newsgroups: ianywhere.public.general
Subject: ANSI_STRING Option
Lines: 17
Organization: Intuit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: charger.intuit.com
X-Original-NNTP-Posting-Host: charger.intuit.com
Message-ID: <45ac14cb@forums-1-dub>
Date: 15 Jan 2007 15:56:59 -0700
X-Trace: forums-1-dub 1168905419 208.240.243.170 (15 Jan 2007 15:56:59 -0700)
X-Original-Trace: 15 Jan 2007 15:56:59 -0700, charger.intuit.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5788
Article PK: 1781

Hi,

Is there a way to set ansi_substring option while/before connecting to the
database? I am using substring function to construct connection string,
which uses negative offset and worked fine with earlier versions of
SqlAnywhere. With the modifications in substring function in SA10, the
application interprets this differently and returns wrong information,
because of which it doesnot construct the connection string properly and
hence is not able to connect to the database. I need a way to set
ansi_substring option to OFF before constructing this connection string, so
that it returns the right information.
Any help is very much appreciated.

Thanks
Neelam


Mark Culp Posted on 2007-01-16 02:03:47.0Z
Message-ID: <45AC3D9A.A452261D@iAnywhere.com>
From: Mark Culp <reply_to_newsgroups_only_please_nospam_mark.culp@iAnywhere.com>
X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: ANSI_STRING Option
References: <45ac14cb@forums-1-dub>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: cpe0004e23b1c57-cm00111a59be64.cpe.net.cable.rogers.com
X-Original-NNTP-Posting-Host: cpe0004e23b1c57-cm00111a59be64.cpe.net.cable.rogers.com
Date: 15 Jan 2007 19:03:47 -0700
X-Trace: forums-1-dub 1168916627 74.109.165.146 (15 Jan 2007 19:03:47 -0700)
X-Original-Trace: 15 Jan 2007 19:03:47 -0700, cpe0004e23b1c57-cm00111a59be64.cpe.net.cable.rogers.com
Lines: 38
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5789
Article PK: 1778

You question is a bit confusing...
Where is the connection string being constructed?
If in the application, then why does the value of ansi_substring matter?
If in the server, then you are already connected to the database and
therefore why do you need to construct a connection string?

FWIW, if you always want the value of ansi_substring to be off then you
could set it to this value in your login procedure.
See
SQL Anywhere® Server - Database Administration
Database Options
Introduction to database options
Alphabetical list of options
login_procedure option [database]
--
Mark Culp
SQLAnywhere Research and Development
-------------------------------------------------------------------------
** Whitepapers, TechDocs, bug fixes are all available through the **
** iAnywhere Developer Community at http://www.ianywhere.com/developer **
-------------------------------------------------------------------------

Neelam Chakrabarty wrote:
>
> Hi,
>
> Is there a way to set ansi_substring option while/before connecting to the
> database? I am using substring function to construct connection string,
> which uses negative offset and worked fine with earlier versions of
> SqlAnywhere. With the modifications in substring function in SA10, the
> application interprets this differently and returns wrong information,
> because of which it doesnot construct the connection string properly and
> hence is not able to connect to the database. I need a way to set
> ansi_substring option to OFF before constructing this connection string, so
> that it returns the right information.
> Any help is very much appreciated.
>
> Thanks
> Neelam


"Nick Elson" < Posted on 2007-01-16 16:05:00.0Z
From: "Nick Elson" <@n@o@.@s@p@a@m@.@n@i@c@k@.@e@l@s@o@n@s@y@b@a@s@e@.@c@o@m@>
Newsgroups: ianywhere.public.general
References: <45ac14cb@forums-1-dub> <45AC3D9A.A452261D@iAnywhere.com>
Subject: Re: ANSI_STRING Option
Lines: 54
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: nicelson-m20.sybase.com
X-Original-NNTP-Posting-Host: nicelson-m20.sybase.com
Message-ID: <45ad05bc$1@forums-1-dub>
Date: 16 Jan 2007 09:05:00 -0700
X-Trace: forums-1-dub 1168967100 10.25.98.215 (16 Jan 2007 09:05:00 -0700)
X-Original-Trace: 16 Jan 2007 09:05:00 -0700, nicelson-m20.sybase.com
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5792
Article PK: 1784

I too agree with Mark especailly about the confusing timing of the use of
the database function [pre-connection].

If you log into one database so that it can be used for access control for
a second connection [possibly to another database], then you may be
able to use the login_procedure to set that option. [I would make that
application specific detecting the application information from the
AppInfo property; or by UID account.] Of course, you could also set
it permanently in the database as a public option.

"Mark Culp" <reply_to_newsgroups_only_please_nospam_mark.culp@iAnywhere.com>

wrote in message news:45AC3D9A.A452261D@iAnywhere.com...
> You question is a bit confusing...
> Where is the connection string being constructed?
> If in the application, then why does the value of ansi_substring matter?
> If in the server, then you are already connected to the database and
> therefore why do you need to construct a connection string?
>
> FWIW, if you always want the value of ansi_substring to be off then you
> could set it to this value in your login procedure.
> See
> SQL Anywhere® Server - Database Administration
> Database Options
> Introduction to database options
> Alphabetical list of options
> login_procedure option [database]
> --
> Mark Culp
> SQLAnywhere Research and Development
> -------------------------------------------------------------------------
> ** Whitepapers, TechDocs, bug fixes are all available through the **
> ** iAnywhere Developer Community at http://www.ianywhere.com/developer **
> -------------------------------------------------------------------------
> Neelam Chakrabarty wrote:
>>
>> Hi,
>>
>> Is there a way to set ansi_substring option while/before connecting to
>> the
>> database? I am using substring function to construct connection string,
>> which uses negative offset and worked fine with earlier versions of
>> SqlAnywhere. With the modifications in substring function in SA10, the
>> application interprets this differently and returns wrong information,
>> because of which it doesnot construct the connection string properly and
>> hence is not able to connect to the database. I need a way to set
>> ansi_substring option to OFF before constructing this connection string,
>> so
>> that it returns the right information.
>> Any help is very much appreciated.
>>
>> Thanks
>> Neelam