dbTalk Databases Forums  

Disappearing date options?

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss Disappearing date options? in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Orlando Ribeiro
 
Posts: n/a

Default Disappearing date options? - 12-15-2003 , 09:58 AM






After installing a new database on my ASA 9.0 server, i had
to change some of it's options to allow the insertion of
date's in ths 'MM-DD-YYYY' format. I did this with this
code:

SET OPTION Date_Format='MM-DD-YYYY'
GO
SET OPTION Date_Order='MDY'
GO
SET OPTION TIMESTAMP_FORMAT='MM/DD/YYYY HH:NN:ss.SSSSSS'
GO
SET PERMANENT
GO

This solved the problem at the moment. But after the
connection was closed and the database stopped, the options
reset to their default values.

Now, everytime i have to insert anything with dates, i have
to execute the code above.

Is there any way to make these settings "connection
independent" ?

Thanks in advance,

Orlando Ribeiro
--

Reply With Quote
  #2  
Old   
Breck Carter [TeamSybase]
 
Posts: n/a

Default Re: Disappearing date options? - 12-15-2003 , 10:15 AM






AFAIK those statements should permanently set the options for the user
id being used; do you drop and recreate the user id, or use different
user ids?

Try SET OPTION PUBLIC.option_name = 'value' to set the options for
everyone.

FWIW the SET PERMANENT statement only applies to ISQL options and
doesn't have the effect you're looking for with these options.

Breck

On 15 Dec 2003 07:58:36 -0800, Orlando Ribeiro wrote:

Quote:
After installing a new database on my ASA 9.0 server, i had
to change some of it's options to allow the insertion of
date's in ths 'MM-DD-YYYY' format. I did this with this
code:

SET OPTION Date_Format='MM-DD-YYYY'
GO
SET OPTION Date_Order='MDY'
GO
SET OPTION TIMESTAMP_FORMAT='MM/DD/YYYY HH:NN:ss.SSSSSS'
GO
SET PERMANENT
GO

This solved the problem at the moment. But after the
connection was closed and the database stopped, the options
reset to their default values.

Now, everytime i have to insert anything with dates, i have
to execute the code above.

Is there any way to make these settings "connection
independent" ?

Thanks in advance,

Orlando Ribeiro
--
bcarter (AT) risingroad (DOT) com
Mobile and Distributed Enterprise Database Applications
www.risingroad.com


Reply With Quote
  #3  
Old   
Orlando Ribeiro
 
Posts: n/a

Default Re: Disappearing date options? - 12-15-2003 , 12:26 PM



I tried using "public" in the statements and the result was
the same. The comands execute without any problems, but the
sysoptions table remains unchanged.

I tried issuing an update command to the sysoptions table,
but it said i didn't have permission. Is it normal that a
DBA user cannot change this table?

I am always connecting with the same user 'orlando', which i
have created (with the application) with DBA and resource
authority on that database. The database itself was created
and started by the application. I access the server using
the OLEDB driver "ASAProv" via Visual Basic. I get "Cannot
convert to timestamp" errors

The date i'm trying to insert is: '30/12/1899'

Hope this helps to figure out the problem...

If i can give you any more information that may help resolve
this problem, please let me know.

Thanks,

Orlando Ribeiro

--
Quote:
AFAIK those statements should permanently set the options
for the user id being used; do you drop and recreate the
user id, or use different user ids?

Try SET OPTION PUBLIC.option_name = 'value' to set the
options for everyone.

FWIW the SET PERMANENT statement only applies to ISQL
options and doesn't have the effect you're looking for
with these options.

Breck

On 15 Dec 2003 07:58:36 -0800, Orlando Ribeiro wrote:

After installing a new database on my ASA 9.0 server, i
had >to change some of it's options to allow the insertion
of >date's in ths 'MM-DD-YYYY' format. I did this with
this >code:

SET OPTION Date_Format='MM-DD-YYYY'
GO
SET OPTION Date_Order='MDY'
GO
SET OPTION TIMESTAMP_FORMAT='MM/DD/YYYY HH:NN:ss.SSSSSS'
GO
SET PERMANENT
GO

This solved the problem at the moment. But after the
connection was closed and the database stopped, the
options >reset to their default values.

Now, everytime i have to insert anything with dates, i
have >to execute the code above.

Is there any way to make these settings "connection
independent" ?

Thanks in advance,

Orlando Ribeiro

--
bcarter (AT) risingroad (DOT) com
Mobile and Distributed Enterprise Database Applications
www.risingroad.com

Reply With Quote
  #4  
Old   
Orlando Ribeiro
 
Posts: n/a

Default Re: Disappearing date options? - 12-15-2003 , 12:41 PM



Tried doing the same thing with the 'DBA' original user,
with success.

So, i the problem may be related to the user...

The user name is 'orlando':
- it has DBA and resource permissions
- it has membership in 'dbo' group and in 'dba' which i
converted to a group to try to fix the problem.

Are there any more properties i need to activate in the
'orlando' user?

Quote:
AFAIK those statements should permanently set the options
for the user id being used; do you drop and recreate the
user id, or use different user ids?

Try SET OPTION PUBLIC.option_name = 'value' to set the
options for everyone.

FWIW the SET PERMANENT statement only applies to ISQL
options and doesn't have the effect you're looking for
with these options.

Breck

On 15 Dec 2003 07:58:36 -0800, Orlando Ribeiro wrote:

After installing a new database on my ASA 9.0 server, i
had >to change some of it's options to allow the insertion
of >date's in ths 'MM-DD-YYYY' format. I did this with
this >code:

SET OPTION Date_Format='MM-DD-YYYY'
GO
SET OPTION Date_Order='MDY'
GO
SET OPTION TIMESTAMP_FORMAT='MM/DD/YYYY HH:NN:ss.SSSSSS'
GO
SET PERMANENT
GO

This solved the problem at the moment. But after the
connection was closed and the database stopped, the
options >reset to their default values.

Now, everytime i have to insert anything with dates, i
have >to execute the code above.

Is there any way to make these settings "connection
independent" ?

Thanks in advance,

Orlando Ribeiro

--
bcarter (AT) risingroad (DOT) com
Mobile and Distributed Enterprise Database Applications
www.risingroad.com

Reply With Quote
  #5  
Old   
Breck Carter [TeamSybase]
 
Posts: n/a

Default Re: Disappearing date options? - 12-15-2003 , 02:51 PM



The whole issue of option settings and user ids is very confusing.

To see what options are in effect when a particular user id connects,
do not try to look at the sysoptions table, but connect *with* that
user id in ISQL and issue the following command to display the current
option settings:

SET;

That will display a dialog box showing everything that is *in effect*.

To keep thing simple, do not specify option settings at the user
level. First of all, drop and recreate the user ids you are having
trouble with... that gets rid of all their user-id-level option
settings.

Then *only* use the following forms of the SET OPTION command:

SET OPTION PUBLIC.option = 'value';
SET TEMPORARY OPTION option = 'value';

The first form sets a global permanent setting. The second form can be
used to temporarily change the setting for the current connection
only.

Breck

On 15 Dec 2003 10:41:22 -0800, Orlando Ribeiro wrote:

Quote:
Tried doing the same thing with the 'DBA' original user,
with success.

So, i the problem may be related to the user...

The user name is 'orlando':
- it has DBA and resource permissions
- it has membership in 'dbo' group and in 'dba' which i
converted to a group to try to fix the problem.

Are there any more properties i need to activate in the
'orlando' user?

AFAIK those statements should permanently set the options
for the user id being used; do you drop and recreate the
user id, or use different user ids?

Try SET OPTION PUBLIC.option_name = 'value' to set the
options for everyone.

FWIW the SET PERMANENT statement only applies to ISQL
options and doesn't have the effect you're looking for
with these options.

Breck

On 15 Dec 2003 07:58:36 -0800, Orlando Ribeiro wrote:

After installing a new database on my ASA 9.0 server, i
had >to change some of it's options to allow the insertion
of >date's in ths 'MM-DD-YYYY' format. I did this with
this >code:

SET OPTION Date_Format='MM-DD-YYYY'
GO
SET OPTION Date_Order='MDY'
GO
SET OPTION TIMESTAMP_FORMAT='MM/DD/YYYY HH:NN:ss.SSSSSS'
GO
SET PERMANENT
GO

This solved the problem at the moment. But after the
connection was closed and the database stopped, the
options >reset to their default values.

Now, everytime i have to insert anything with dates, i
have >to execute the code above.

Is there any way to make these settings "connection
independent" ?

Thanks in advance,

Orlando Ribeiro

--
bcarter (AT) risingroad (DOT) com
Mobile and Distributed Enterprise Database Applications
www.risingroad.com
--
bcarter (AT) risingroad (DOT) com
Mobile and Distributed Enterprise Database Applications
www.risingroad.com


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.