2011/12/15 Timuçin Kızılay <[email protected]>: > Hello, > > I have to write an application using ms sql server database. I have to use > an existing database that being used in the company and my app should do > some data entry and lots of reporting. > > I'd like to use turbogears because the other option is to use .net. > > I have some questions because I have only used postgresql with turbogears > before. > > -first question is codepage issues. in tg I'll use utf8 and the mssql > database is not using unicode but using another codepage. I think this will > give me problems. >
Using SQLA you can expose all your data using Unicode column, so your application will just work on unicode objects without caring too much about their representation on the database side. When you connect to the engine you can specify which encoding that database will use to represent strings, then on python you will just get unicode strings. > - second: the database is already created and full of data so is there any > way to get the table definitions in model files automagicaly? > Yes, you can use table reflection. The quickstarted project already has some commented lines of code inside the model to guide you at setting it up. You can even use sqlalchemy-migrate to autogenerate the model from the tables, which gives you a little bit more control over your models. > - third: is there any sample code using mssql databases? > If you use SQLAlchemy (which is the default database layer for TG) any example around should work correctly even on mssql. -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.

