Source language: Translate to:

Get Column Order with vbscript

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Get Column Order with vbscript

Postby smokinbanger » Mon Oct 29, 2012 9:29 am

We have a dbpSetColumnOrder but no dbpGetColumnOrder. It is possible to access databases with vbscript using ADODB object:
Code: Select all
Set objConnection = CreateObject("ADODB.Connection")
Set objRecordSet = CreateObject("ADODB.Recordset")
Is there a way to use this to return the column order?
Just Sayin'...
smokinbanger
 
Posts: 198
Joined: Mon Jan 16, 2012 9:53 am
Location: United States

Re: Get Column Order with vbscript

Postby Neosoft Support » Mon Oct 29, 2012 11:06 am

I'm not sure about VBScript, but dbpGetFieldNames should return the default column order.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Get Column Order with vbscript

Postby smokinbanger » Mon Oct 29, 2012 5:20 pm

Actually was looking for more of a way to get the user modified order to reload it at next run.
Just Sayin'...
smokinbanger
 
Posts: 198
Joined: Mon Jan 16, 2012 9:53 am
Location: United States

Re: Get Column Order with vbscript

Postby Gaev » Mon Oct 29, 2012 8:43 pm

smokinbanger:
a way to get the user modified order
How would the user do this outside of your scripts ?
to reload it at next run
Assuming all reorders are done via script ...

- every time you do a dbpSetColumnOrder, you would also save it ... perhaps in a Table named ColumnOrders ... with fields called TableName and ColumnOrder

- then, each time the Table is displayed as a View, the text stored in the ColumnOrder field is used to do a dbpSetColumnOrder first.
User avatar
Gaev
 
Posts: 3717
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Get Column Order with vbscript

Postby smokinbanger » Tue Oct 30, 2012 5:34 pm

Gaev,

The user can RIGHT click and drag a column header or title to reorder them. Thus any saved order will no longer match.
Just Sayin'...
smokinbanger
 
Posts: 198
Joined: Mon Jan 16, 2012 9:53 am
Location: United States

Re: Get Column Order with vbscript

Postby Gaev » Wed Oct 31, 2012 5:37 am

smokinbanger:
The user can RIGHT click and drag a column header or title to reorder them.

:!: ...Live and learn
User avatar
Gaev
 
Posts: 3717
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 1 guest