Index
2011-12-08 17:18 – Rand Batchelder : [dabo-users] AppWizard Request
2011-12-08 18:24 – Paul McNett : Re: [dabo-users] AppWizard Request
2011-12-08 20:35 – John Fabiani : Re: [dabo-users] AppWizard Request
2011-12-09 03:31 – Jacek Kałucki : Re: [dabo-users] AppWizard Request
2011-12-09 11:50 – Rand Batchelder : Re: [dabo-users] AppWizard Request
2011-12-09 12:15 – Jacek Kałucki : Re: [dabo-users] AppWizard Request
Back to top
[dabo-users] AppWizard Request

Author: Rand Batchelder

Posted: 2011-12-08 17:18:55   Link

I am using the appwizard with MS SQL.

I would like to build an app from a View, but the appwizard only lists available tables.

Is this doable ?

Also, can I copy and paste from the query results Grid on the Browse tab ?

thanks

Rand

--- StripMime Report -- processed MIME parts ---

multipart/alternative

text/plain (text body -- kept)

text/html

---

_______________________________________________

Post Messages to: Dabo-users@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Searchable Archives: http://leafe.com/archives/search/dabo-users

This message: http://leafe.com/archives/byMID/1323382735.84736.YahooMailNeo@web160906.mail.bf1.yahoo.com

©2011 Rand Batchelder
Back to top
Re: [dabo-users] AppWizard Request

Author: Paul McNett

Posted: 2011-12-08 18:24:44   Link

On 12/8/11 2:18 PM, Rand Batchelder wrote:

> I am using the appwizard with MS SQL.

>

> I would like to build an app from a View, but the appwizard only lists available tables.

> Is this doable ?

Sure, we just need to fix up dabo/db/dbMsSQL.py, function getTables() to use SQL to

include the views. The current code is:

92 dbName = self.database

93

94 sql = """

95 select table_name

96 from INFORMATION_SCHEMA.TABLES

97 where table_catalog = '%(db)s'

98 and table_type = 'BASE TABLE'

99 order by table_name """

100

101 cursor.execute(sql % {'db':dbName})

102

103 rs = cursor.getDataSet()

104 tables = [x["table_name"] for x in rs]

105 tables = tuple(tables)

106

107 return tables

I don't know enough about MSSQL to do it, but we probably need a UNION between

INFORMATION_SCHEMA.VIEWS and INFORMATION_SCHEMA.TABLES or perhaps it is just changing

the where clause to include table_type like '%VIEW%'.

> Also, can I copy and paste from the query results Grid on the Browse tab ?

No, but that would be a cool enhancement.

Paul

_______________________________________________

Post Messages to: Dabo-users@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Searchable Archives: http://leafe.com/archives/search/dabo-users

This message: http://leafe.com/archives/byMID/4EE1473C.7080209@ulmcnett.com

©2011 Paul McNett
Back to top
Re: [dabo-users] AppWizard Request

Author: John Fabiani

Posted: 2011-12-08 20:35:42   Link

On Thursday, December 08, 2011 03:24:44 PM Paul McNett wrote:

> On 12/8/11 2:18 PM, Rand Batchelder wrote:

> > I am using the appwizard with MS SQL.

> >

> > I would like to build an app from a View, but the appwizard only lists

> > available tables. Is this doable ?

>

> Sure, we just need to fix up dabo/db/dbMsSQL.py, function getTables() to use

> SQL to include the views. The current code is:

>

> 92 dbName = self.database

> 93

> 94 sql = """

> 95 select table_name

> 96 from INFORMATION_SCHEMA.TABLES

> 97 where table_catalog = '%(db)s'

> 98 and table_type = 'BASE TABLE'

> 99 order by table_name """

> 100

> 101 cursor.execute(sql % {'db':dbName})

> 102

> 103 rs = cursor.getDataSet()

> 104 tables = [x["table_name"] for x in rs]

> 105 tables = tuple(tables)

> 106

> 107 return tables

>

> I don't know enough about MSSQL to do it, but we probably need a UNION

> between INFORMATION_SCHEMA.VIEWS and INFORMATION_SCHEMA.TABLES or perhaps

> it is just changing the where clause to include table_type like '%VIEW%'.

>

> > Also, can I copy and paste from the query results Grid on the Browse tab

> > ?

> No, but that would be a cool enhancement.

>

> Paul

The dbPostgres.py already returns views and I did just make two queries.

Johnf

_______________________________________________

Post Messages to: Dabo-users@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Searchable Archives: http://leafe.com/archives/search/dabo-users

This message: http://leafe.com/archives/byMID/1675261.4mPdouPslr@linux-12

©2011 John Fabiani
Back to top
Re: [dabo-users] AppWizard Request

Author: Jacek Kałucki

Posted: 2011-12-09 03:31:08   Link

Użytkownik Rand Batchelder napisał:

> I would like to build an app from a View, but the appwizard only lists available tables.

> Is this doable ?

Hi.

I posted fix in r7012 commit. Check it now please.

--

Regards

Jacek Kałucki

_______________________________________________

Post Messages to: Dabo-users@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Searchable Archives: http://leafe.com/archives/search/dabo-users

This message: http://leafe.com/archives/byMID/4EE1C74C.30807@rz.onet.pl

©2011 Jacek Kałucki
Back to top
Re: [dabo-users] AppWizard Request

Author: Rand Batchelder

Posted: 2011-12-09 11:50:59   Link

>> Użytkownik Rand Batchelder napisał:

>> I would like to build an app from a View, but the appwizard only lists available tables.

>> Is this doable ?

 

>Hi.

 

>I posted fix in r7012 commit. Check it now please.

 

>--

>Regards

>Jacek Kałucki

Now I can see the views listed with available tables,

but now the appwizard doesn't include any fields in the app

for a view or a table from MSSQL.

Rand

--- StripMime Report -- processed MIME parts ---

multipart/alternative

text/plain (text body -- kept)

text/html

---

_______________________________________________

Post Messages to: Dabo-users@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Searchable Archives: http://leafe.com/archives/search/dabo-users

This message: http://leafe.com/archives/byMID/1323449459.18162.YahooMailNeo@web160902.mail.bf1.yahoo.com

©2011 Rand Batchelder
Back to top
Re: [dabo-users] AppWizard Request

Author: Jacek Kałucki

Posted: 2011-12-09 12:15:38   Link

Użytkownik Rand Batchelder napisał:

> Now I can see the views listed with available tables,

> but now the appwizard doesn't include any fields in the app

> for a view or a table from MSSQL.

Sorry, try r7015 instead.

--

Regards

Jacek Kałucki

_______________________________________________

Post Messages to: Dabo-users@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Searchable Archives: http://leafe.com/archives/search/dabo-users

This message: http://leafe.com/archives/byMID/4EE2423A.80202@rz.onet.pl

©2011 Jacek Kałucki