Setting properties on the client side.

Hi All,

    yesterday I had a problem regarding the "chained/unchained/anymode"
property for store procedures in Sybase. The problem was that I was not able
to access my store procedures in autocommit(false) mode. To solve this, I
had to set the mode to "anymode" from the Sybase Central.

    Now, I know I can set properties to the driver when I create the
connection to the database. Does anyone know how I can set these properties
dynamically ? Using ConnectionPoolDataSource, I know I can set the
properties but I just don't know the name for these properties. And well, to
be honest, Sybase's documentation is the worst I ever seen for such a
product.

    Could anyone tip me on this ?

Max.


0
Maxime
9/14/2001 2:58:41 PM
sybase.jconnect 798 articles. 0 followers. Follow

4 Replies
555 Views

Similar Articles

[PageSpeed] 7

Maxime,

Could you be more specific with regards to setting the properties?

What specific properties are you looking to set?   When you mean
you want to set them dynamically,  exactly what do you mean?

Steve Healey
Sybase TS

"Maxime Poulin" <maxime@zerobase.com> wrote in message
news:gssV3ETPBHA.150@forums.sybase.com...
> Hi All,
>
>     yesterday I had a problem regarding the "chained/unchained/anymode"
> property for store procedures in Sybase. The problem was that I was not
able
> to access my store procedures in autocommit(false) mode. To solve this, I
> had to set the mode to "anymode" from the Sybase Central.
>
>     Now, I know I can set properties to the driver when I create the
> connection to the database. Does anyone know how I can set these
properties
> dynamically ? Using ConnectionPoolDataSource, I know I can set the
> properties but I just don't know the name for these properties. And well,
to
> be honest, Sybase's documentation is the worst I ever seen for such a
> product.
>
>     Could anyone tip me on this ?
>
> Max.
>
>


0
Steve
9/14/2001 3:18:05 PM
Well in this very case, I would like to set chained mode to off or on...

For instance in our C++ version, when connecting to the Sybase database, we
use the code :

   paramvalue = CS_FALSE;
   ct_options (connection, CS_SET, CS_OPT_CHAINXACTS, &paramvalue,
CS_UNUSED, NULL);
   ct_options (connection, CS_SET, CS_OPT_CURCLOSEONXACT, &paramvalue,
CS_UNUSED, NULL);

which allows us to access the stored procedured in autocommit(false) mode.
As I said in the previous mail, I can do this directly ion the database
central, for each stored proc I create. However, what I am looking for is a
way to do it when creating the instance of ConnectionPoolDataSource or when
obtaining a connection, something like :

ConnectionPoolDataSource cpds = new SybConnectionPoolDataSource();
.....
cpds.setProperty(<property name for chaining>, <value>);

See what I mean ? The thing is that we do not wish to ask all of our clients
to change the exec mode of all their stored proc to "anymode", we would
prefer to simply set a flag when getting the connection to the DB from the
java client code...

Hmmm, do you need more details ? I sometime find that I am a very very bad
"problem describer" ...

"Steve Healey" <Stephen.Healey@sybase.com> wrote in message
news:x8GGxPTPBHA.267@forums.sybase.com...
> Maxime,
>
> Could you be more specific with regards to setting the properties?
>
> What specific properties are you looking to set?   When you mean
> you want to set them dynamically,  exactly what do you mean?
>
> Steve Healey
> Sybase TS
>
> "Maxime Poulin" <maxime@zerobase.com> wrote in message
> news:gssV3ETPBHA.150@forums.sybase.com...
> > Hi All,
> >
> >     yesterday I had a problem regarding the "chained/unchained/anymode"
> > property for store procedures in Sybase. The problem was that I was not
> able
> > to access my store procedures in autocommit(false) mode. To solve this,
I
> > had to set the mode to "anymode" from the Sybase Central.
> >
> >     Now, I know I can set properties to the driver when I create the
> > connection to the database. Does anyone know how I can set these
> properties
> > dynamically ? Using ConnectionPoolDataSource, I know I can set the
> > properties but I just don't know the name for these properties. And
well,
> to
> > be honest, Sybase's documentation is the worst I ever seen for such a
> > product.
> >
> >     Could anyone tip me on this ?
> >
> > Max.
> >
> >
>
>


0
Maxime
9/14/2001 3:32:10 PM
Maxine,

You can use the connection.setAutoCommit() method to change the
txn mode.   Example:

Connection con = new Connection();
con.setAutoCommit(true);
 .... execute the stored proc in chained mode
 ....  do whatever else you want
con.setAutoCommit(false);

Steve Healey

"Maxime Poulin" <maxime@zerobase.com> wrote in message
news:i6kzkXTPBHA.198@forums.sybase.com...
> Well in this very case, I would like to set chained mode to off or on...
>
> For instance in our C++ version, when connecting to the Sybase database,
we
> use the code :
>
>    paramvalue = CS_FALSE;
>    ct_options (connection, CS_SET, CS_OPT_CHAINXACTS, &paramvalue,
> CS_UNUSED, NULL);
>    ct_options (connection, CS_SET, CS_OPT_CURCLOSEONXACT, &paramvalue,
> CS_UNUSED, NULL);
>
> which allows us to access the stored procedured in autocommit(false) mode.
> As I said in the previous mail, I can do this directly ion the database
> central, for each stored proc I create. However, what I am looking for is
a
> way to do it when creating the instance of ConnectionPoolDataSource or
when
> obtaining a connection, something like :
>
> ConnectionPoolDataSource cpds = new SybConnectionPoolDataSource();
> ....
> cpds.setProperty(<property name for chaining>, <value>);
>
> See what I mean ? The thing is that we do not wish to ask all of our
clients
> to change the exec mode of all their stored proc to "anymode", we would
> prefer to simply set a flag when getting the connection to the DB from the
> java client code...
>
> Hmmm, do you need more details ? I sometime find that I am a very very bad
> "problem describer" ...
>
> "Steve Healey" <Stephen.Healey@sybase.com> wrote in message
> news:x8GGxPTPBHA.267@forums.sybase.com...
> > Maxime,
> >
> > Could you be more specific with regards to setting the properties?
> >
> > What specific properties are you looking to set?   When you mean
> > you want to set them dynamically,  exactly what do you mean?
> >
> > Steve Healey
> > Sybase TS
> >
> > "Maxime Poulin" <maxime@zerobase.com> wrote in message
> > news:gssV3ETPBHA.150@forums.sybase.com...
> > > Hi All,
> > >
> > >     yesterday I had a problem regarding the
"chained/unchained/anymode"
> > > property for store procedures in Sybase. The problem was that I was
not
> > able
> > > to access my store procedures in autocommit(false) mode. To solve
this,
> I
> > > had to set the mode to "anymode" from the Sybase Central.
> > >
> > >     Now, I know I can set properties to the driver when I create the
> > > connection to the database. Does anyone know how I can set these
> > properties
> > > dynamically ? Using ConnectionPoolDataSource, I know I can set the
> > > properties but I just don't know the name for these properties. And
> well,
> > to
> > > be honest, Sybase's documentation is the worst I ever seen for such a
> > > product.
> > >
> > >     Could anyone tip me on this ?
> > >
> > > Max.
> > >
> > >
> >
> >
>
>


0
Steve
9/14/2001 5:47:38 PM
OK, this I know. But what if I wish to know the list of alll the properties
I can set for Sybase ? I browsed the web site, searched the CDs and
directories and never found that information.

And this also leads me to another question. Suppose the following :
Connection con = new Connection();
(*) con.setAutoCommit(false);

.... code that inserts stuff in the db

(**) con.setAutoCommit(true);

.... code that calls a stored procedure (select).

(***) con.setAutoCommit(false);

.... code that inserts stuff in the db
.... code that verifies if all was done properly

if (notDoneProperly)
    con.rollBack();
else
    con.commit();

Ok, so when I rollBack, it will rollback everything that was done between
(*) and (**) and after (***) ? I mean, I can switch on and off autocommit as
I want and can rollback everything that was don in autocommit(false) mode ?

Max.

"Steve Healey" <Stephen.Healey@sybase.com> wrote in message
news:TpClVjUPBHA.150@forums.sybase.com...
> Maxine,
>
> You can use the connection.setAutoCommit() method to change the
> txn mode.   Example:
>
> Connection con = new Connection();
> con.setAutoCommit(true);
>  .... execute the stored proc in chained mode
>  ....  do whatever else you want
> con.setAutoCommit(false);
>
> Steve Healey
>
> "Maxime Poulin" <maxime@zerobase.com> wrote in message
> news:i6kzkXTPBHA.198@forums.sybase.com...
> > Well in this very case, I would like to set chained mode to off or on...
> >
> > For instance in our C++ version, when connecting to the Sybase database,
> we
> > use the code :
> >
> >    paramvalue = CS_FALSE;
> >    ct_options (connection, CS_SET, CS_OPT_CHAINXACTS, &paramvalue,
> > CS_UNUSED, NULL);
> >    ct_options (connection, CS_SET, CS_OPT_CURCLOSEONXACT, &paramvalue,
> > CS_UNUSED, NULL);
> >
> > which allows us to access the stored procedured in autocommit(false)
mode.
> > As I said in the previous mail, I can do this directly ion the database
> > central, for each stored proc I create. However, what I am looking for
is
> a
> > way to do it when creating the instance of ConnectionPoolDataSource or
> when
> > obtaining a connection, something like :
> >
> > ConnectionPoolDataSource cpds = new SybConnectionPoolDataSource();
> > ....
> > cpds.setProperty(<property name for chaining>, <value>);
> >
> > See what I mean ? The thing is that we do not wish to ask all of our
> clients
> > to change the exec mode of all their stored proc to "anymode", we would
> > prefer to simply set a flag when getting the connection to the DB from
the
> > java client code...
> >
> > Hmmm, do you need more details ? I sometime find that I am a very very
bad
> > "problem describer" ...
> >
> > "Steve Healey" <Stephen.Healey@sybase.com> wrote in message
> > news:x8GGxPTPBHA.267@forums.sybase.com...
> > > Maxime,
> > >
> > > Could you be more specific with regards to setting the properties?
> > >
> > > What specific properties are you looking to set?   When you mean
> > > you want to set them dynamically,  exactly what do you mean?
> > >
> > > Steve Healey
> > > Sybase TS
> > >
> > > "Maxime Poulin" <maxime@zerobase.com> wrote in message
> > > news:gssV3ETPBHA.150@forums.sybase.com...
> > > > Hi All,
> > > >
> > > >     yesterday I had a problem regarding the
> "chained/unchained/anymode"
> > > > property for store procedures in Sybase. The problem was that I was
> not
> > > able
> > > > to access my store procedures in autocommit(false) mode. To solve
> this,
> > I
> > > > had to set the mode to "anymode" from the Sybase Central.
> > > >
> > > >     Now, I know I can set properties to the driver when I create the
> > > > connection to the database. Does anyone know how I can set these
> > > properties
> > > > dynamically ? Using ConnectionPoolDataSource, I know I can set the
> > > > properties but I just don't know the name for these properties. And
> > well,
> > > to
> > > > be honest, Sybase's documentation is the worst I ever seen for such
a
> > > > product.
> > > >
> > > >     Could anyone tip me on this ?
> > > >
> > > > Max.
> > > >
> > > >
> > >
> > >
> >
> >
>
>


0
Maxime
9/14/2001 7:05:12 PM
Reply:

Similar Artilces:

How to set the X Properties of a ModalPopup on client side codes?
I want to find the position of a selected TreeNode in a TreeView.Then set the X Properties and Y Properties of the ModalPopup. And make the panel1 pop up beside the selected node. Does anyone know how to do that? Any suggestion is welcome.     <script type="text/javascript">    function FindPosition(elem)    {        debugger;        var id=elem.id;        var x=getX(elem);        var y...

Set server control property from client side javascript?
I need to be able to set a server control property from clientside javascript and then have the property persist through a postback. Specifically,I need to set the imageUrl property of an imagebutton control. I've tried using the following code in javascript but it doesn't work: document.getElementById('ImageButton1').ImageUrl = 'path_to_image'; this above code doesn't generate any errors and I can step through it fine in the debugger, but it doesn't actually set the imageUrl property. I am able to set the imageurl property successfully with the following code, but it doesn't ...

How to set web user control property from client side ?
Hi,I've created a web user control and it has some property. public partial class MyControl: System.Web.UI.UserControl { string _PropertyA; public string PropertyA { get { return _PropertyA; } set { _PropertyA= value; } } }  Is there a way to set this property from client side,  similar to the way i do it on server side (e.g MyControl.PropertyA =...)?Thanks,Tok Dont forget to click "Mark as Answer" on the post that helped you Hi this is a solution, but not the nicest one :  ...

setting server controls properties via client side javascript
can I set server side controls properties using client side javascript functions If so - can you point me to code examples please ? To communicate client-side changes to server-side objects, you have to use a hidden input as a helper to hold those changes and then handle the returned changes server-side.  IIRC, the QuickStarts had an example of persisting client-side changes.  So, that would be a good place to start......

Setting font and color properties of Label control on Client side using js dont retain on postback
Hi,    I'm setting a few styles and text properties on a label control on the client side using DOM. When I post back the page, I do not see any of those changes. What is the easiest way to rtain those changes even upon page postback?? ThanksShravan Addaypally MCP Take a look at this article: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/dhtmlobjectmodel2.asp It has a whole section on persisting client-side state. Darrell Norton, MVPDarrell Norton's BlogPlease mark this post as answered if it helped you! All the while I played with thi...

Update a server-side object property from client side
Hi, I was wondering if it's possible to update a server-side object property from a client-side JavaScript using Ajax. For example I have some user control with a textbox in it, and the user control has a property named SomeProperty. When the textbox is blurred I want to update this property with the value that is currently in the textbox, but I want to set it server-side so it updates the ViewState or whatever is used to save it on the server. Is this possible to do? Not sure how this is done in ASP.NET AJAX, but this can be done with ICallbackEventHandler which is an interface in stock a...

Changing Server-Side Control Properties by Client-Side
Hi, I have 4 server side button control. These are for choices of a competition website(A,B,C,D) and I have 1 client side button control named "Changer" on the same page. When I click the Changer I want it to disable A, if it is disabled I want it to disable B... The main question in this topic is "How can I change properties of a server-side control by client-side" My javascript side is not very well. How can I do this? Please help me. I got it guys. Thank You very much.. Hi, Here is the javascript for enable and disable two server side buttons with id Button1 and Butt...

How to set a cookie in client side a acces that in server side?
Hi,I have used  [document.cookie = 'nav=another test; expires=Fri, 3 Aug 2009 20:47:11 UTC; path=/' ] the code enclosed in bracket to set the cookie in the client side. However if i try to access the same in the code file, the value comes as blank. Please guide me how to set it in client side and access in server side. ---------Drudge  To write -         HttpCookie cookie = Request.Cookies["Language"];        if (cookie == null)        {   ...

ScriptControl: Client-Side Properties Not Persisting Back To Server-Side
I am working on an ASP.NET Virtual Earth server control using ASP.NET AJAX Extensions. The location of my control is http://codeplex.com/pietschsoftve3. However, the current version on the site isn't my new AJAX version because I am currently developing it. My control is inheriting from the ScriptControl base class in the ASP.NET AJAX Extensions library. I have properties of my server-side control that get persisted down to the client-side JSON object representation of my control. The issue I am having is when a post-back occurs after some of the client-side properties are changed; those ch...

How can I set client side values as server side values?
Hi, Can anyone tell me how I can get client side values such as document.referrer, navigator.appName etc... into server side scripts? There are some client side values I'd like to set as session vars and insert into the db? How do I go about this? Thanks for any pointers Davlon PS (I'm using powersite 7.1.0.300) Pass them as page parameters, e.g., http://myserver/myurl?document.referrer=whatever&navigator.appName=yadayada Then, in your server-side script, just loop through the document.value array and get these values. -- pbm_hopethishelps, Roy Kie...

ajax
Dear all, I made my own autoComplete extender because the standard one was not suitable for us... I have a problem to returning a property value of my extender that was changed on the client-side. I used the default extender template in order to create it. Does anyone knows how to update a property on client-side and get its value on the postBack? Normally the GetPropertyValue of the ExtenderControlBase should pick the value from client but it returns the default value on null... Please help me... Thank you very much Hi Have you or anybody else managed to find a solution for this...

textbox value set on client side, is not visible on server side or, on the source of the page.
hi, I have a textbox on my webform. the first time I load my page I fill this textbox with  "name" on the server side. once the page is loaded I set the value of the textbox to "thisIsme" with client side code. I even see a different text in the texbox. client side:document.all('txtnameInput').value =  'thisIsme'; server side:Me.txtnaam.Text 'is stil "name" and not "thisIsme" Why is this happening? on the webpage I see the text "thisIsme", but when I look at the source of the webpage I still see the old value in it. it's very odd... I am NOT setting the value back to "name...

The value set to controls at client side donot persist for each page load, else it is again set to the default value...??
 I am trying to set date to the textbox field using javascript (Client side), the function is as follows. function From_calendarPicker(){                                var    sDPath = "../Calender.aspx";                 var    oWin = window.showModalDialog(sDPath, null, "dialogWidth:300px;dialogHeight:250px;help:0;status:0;scroll:0;center:1");  &nbs...

without server side scripting, can we upload a file using client side scripting if destination folder and config file settings are known? is it possible?
without server side scripting, can we upload a file using client side scripting if destination folder and config file settings are known? is it possible? avdp211:without server side scripting, can we upload a file using client side scripting if destination folder and config file settings are known? is it possible? I don't think it is possible.You use the the HTML input file control and when you post the request, on the web server you need to read the data and save it to a file, so there has to be some interaction with the server to handle the post request.  Not possible vi...

Web resources about - Setting properties on the client side. - sybase.jconnect

General Growth Properties - Wikipedia, the free encyclopedia
Chicago , Illinois , U.S. General Growth Properties, Inc. is an American real estate investment trust , headquartered at 110 North Wacker Drive ...

RentalRoost Brings Facebook Into Process Of Matching Up Home Seekers, Available Properties
... places to live , as RentalRoost , a San Francisco Bay-area-based website that incorporates Facebook data into its rankings of available properties, ...

Extended Profile Properties - Facebook-Entwickler
These Permissions cannot be revoked in the Login Dialog during the login flow, meaning they are non-optional for Users when logging into your ...

PortPerry Properties (@brian14mckinlay) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Hawaii Real Estate Properties for iPad on the App Store on iTunes
Get Hawaii Real Estate Properties for iPad on the App Store. See screenshots and ratings, and read customer reviews.

Airbnb's reach extends from spare rooms to empty, multi-room properties, report reveals
Nearly half the listings on Airbnb in Melbourne are not for spare rooms in someone's home&nbsp;but for entire houses or apartments that are never ...

Australian Federal Police raid properties in new CFMEU-linked investigation
Federal Police have raided properties as part of an investigation into a CFMEU organiser suspected by authorities of being bribed.

ATO crackdown on rental properties, holiday homes
Australians who rent out their holiday homes for a few weeks a year, but then try to claim bigger deductions - including maintenance and mortgage ...

Digital detox: Australians seek out nature properties to overcome technology burnout
Holiday home rental companies say they have seen a spike in the number of customers seeking digital detoxes, allowing savvy homeowners to offer ...

These are the 9 Airbnb properties where everybody dreams of staying
Airbnb has become popular partly because people can open up their exquisite (or strange) properties around the world. When Airbnb looked at ...

Resources last updated: 1/23/2016 8:37:01 PM