Informix OLE DB Provider & VB6
Posted in 1999
Topics: Internationalization & Character Sets
1) Do you know how to specify the date format for inserting into the informix 7.23 using VB6.0 (i.e. using GLS)? We have attempted using setnet32 to change the contents of CLIENT_LOCALE and DB_LOCALE in a hope to change the date format for inserting into the database (at present it's yyyy/mm/dd) we want to change it to dd/mm/yyyy i.e. british. 2) Am i right in thinking the OLE DB provider reads the setting from setnet32 on execution of all SQL statements? 3) Where are these kept? 4) Do you know how to specify a different cursor type (preserve/close) from the default? Thanks, Andy McColl
Andy, Locale will affect character conversions but not date, since OLE DB spec defines that a date format is YYYY-MM-DD. Some of setnet settings are used when application loads provider DLL, some - when connection is established. If you change the setting after provider was loaded but before connecting, it is not specified whether it will affect the connection or not. Cursors opened by Informix provider are WITH HOLD (properties DBPROP_ABORTPRESERVE and DBPROP_COMMITPRESERVE are VARIANT_TRUE). Leopold Andy McColl <andy.mccoll@vernons.co.uk> wrote in message news:934816063.20903.0.nnrp-13.d4f05361@news.demon.co.uk... > > 1) Do you know how to specify the date format for inserting into the > informix 7.23 using VB6.0 (i.e. using GLS)? > > We have attempted using setnet32 to change the contents of CLIENT_LOCALE and > DB_LOCALE in a hope to change the date format for > inserting into the database (at present it's yyyy/mm/dd) we want to change > it to dd/mm/yyyy i.e. british. > > 2) Am i right in thinking the OLE DB provider reads the setting from > setnet32 on execution of all SQL statements? > 3) Where are these kept? > 4) Do you know how to specify a different cursor type (preserve/close) from > the default? > > Thanks, > > Andy McColl > > > >
Thanks for the info.. great help.. Where do you set the properties for the hold cursor? Is it on the connection string? Thanks for your help. Andy Leopold The Cat wrote in message <7pa0t6$nnk1@webint.na.informix.com>... >Andy, > >Locale will affect character conversions but not date, since OLE DB spec >defines that a date format is YYYY-MM-DD. > >Some of setnet settings are used when application loads provider DLL, some - >when connection is established. If you change the setting after provider was >loaded but before connecting, it is not specified whether it will affect the >connection or not. > >Cursors opened by Informix provider are WITH HOLD (properties >DBPROP_ABORTPRESERVE and DBPROP_COMMITPRESERVE are VARIANT_TRUE). > >Leopold > >Andy McColl <andy.mccoll@vernons.co.uk> wrote in message >news:934816063.20903.0.nnrp-13.d4f05361@news.demon.co.uk... >> >> 1) Do you know how to specify the date format for inserting into the >> informix 7.23 using VB6.0 (i.e. using GLS)? >> >> We have attempted using setnet32 to change the contents of CLIENT_LOCALE >and >> DB_LOCALE in a hope to change the date format for >> inserting into the database (at present it's yyyy/mm/dd) we want to change >> it to dd/mm/yyyy i.e. british. >> >> 2) Am i right in thinking the OLE DB provider reads the setting from >> setnet32 on execution of all SQL statements? >> 3) Where are these kept? >> 4) Do you know how to specify a different cursor type (preserve/close) >from >> the default? >> >> Thanks, >> >> Andy McColl >> >> >> >> > >
Andy, They are rowset properties - cannot set them through the ADO connection string. But you do not need to set them - cursors are always with hold. Leopold Andy McColl <andy.mccoll@vernons.co.uk> wrote in message news:934877440.16591.0.nnrp-09.d4f05361@news.demon.co.uk... > Thanks for the info.. great help.. > > Where do you set the properties for the hold cursor? Is it on the connection > string? > > Thanks for your help. > > Andy > > > Leopold The Cat wrote in message <7pa0t6$nnk1@webint.na.informix.com>... > >Andy, > > > >Locale will affect character conversions but not date, since OLE DB spec > >defines that a date format is YYYY-MM-DD. > > > >Some of setnet settings are used when application loads provider DLL, > some - > >when connection is established. If you change the setting after provider > was > >loaded but before connecting, it is not specified whether it will affect > the > >connection or not. > > > >Cursors opened by Informix provider are WITH HOLD (properties > >DBPROP_ABORTPRESERVE and DBPROP_COMMITPRESERVE are VARIANT_TRUE). > > > >Leopold > > > >Andy McColl <andy.mccoll@vernons.co.uk> wrote in message > >news:934816063.20903.0.nnrp-13.d4f05361@news.demon.co.uk... > >> > >> 1) Do you know how to specify the date format for inserting into the > >> informix 7.23 using VB6.0 (i.e. using GLS)? > >> > >> We have attempted using setnet32 to change the contents of CLIENT_LOCALE > >and > >> DB_LOCALE in a hope to change the date format for > >> inserting into the database (at present it's yyyy/mm/dd) we want to > change > >> it to dd/mm/yyyy i.e. british. > >> > >> 2) Am i right in thinking the OLE DB provider reads the setting from > >> setnet32 on execution of all SQL statements? > >> 3) Where are these kept? > >> 4) Do you know how to specify a different cursor type (preserve/close) > >from > >> the default? > >> > >> Thanks, > >> > >> Andy McColl > >> > >> > >> > >> > > > > > >