django-mssql

How can I connect to SQL Server 2008 R2 with django-mssql?

旧街凉风 提交于 2019-12-06 08:33:01
问题 I cannot figure out why I cannot get django to connect with sql server 2008 r2. I have administrative privileges on our server and on sql server. I have constructed a virtual windows box with windows server 2008 sp2 because I thought I might have some luck with django-mssql. I've tried both django-pyodbc and django-mssql on the windows box but have not yet succeeded. Here are my db settings: DATABASES = { 'default': { 'ENGINE': 'sqlserver_ado', # Have also tried sql_server.pyodbc 'NAME':

pywintypes27.dll not found using Apache, Django, pywin32, Python2.7 and mod_wsgi

半世苍凉 提交于 2019-12-05 14:21:56
I have a Django application using django-mssql to communicate w/ SQL Server. This works just fine in the dev server (runserver) but under Apache/mod-wsgi, I get a error related to it trying to find a .dll which does exist: Exception Type: ImportError Exception Value: No system module 'pywintypes' (pywintypes27.dll) Exception Location: C:\Python27\lib\site-packages\win32\lib\pywintypes.py in __import_pywin32_system_module__, line 98 Python Executable: C:\Program Files (x86)\Apache Software Foundation\Apache2.2\bin\httpd.exe I used ActivePython2.7.2, mod_wsgi, pywin32 Build 216 and Django1.3.1,

How can I connect to SQL Server 2008 R2 with django-mssql?

无人久伴 提交于 2019-12-04 15:36:09
I cannot figure out why I cannot get django to connect with sql server 2008 r2. I have administrative privileges on our server and on sql server. I have constructed a virtual windows box with windows server 2008 sp2 because I thought I might have some luck with django-mssql. I've tried both django-pyodbc and django-mssql on the windows box but have not yet succeeded. Here are my db settings: DATABASES = { 'default': { 'ENGINE': 'sqlserver_ado', # Have also tried sql_server.pyodbc 'NAME': 'TMSEPLAY', 'USER': '***', # Omitted for post 'PASSWORD': '*******', # Omitted for post 'HOST': '172.16.1

Establishing connection to MS SQL Server 2014 with django-mssql-1.6

纵然是瞬间 提交于 2019-12-03 16:35:50
i am aware that the django-mssql-1.6/README states: SQL Server Versions Supported Versions: 2008 2008r2 2012 but, seeing as v. 1.6 is the latest version available, i was wondering if anyone was able to find a way to connect to an MS SQL Server 2014. I am trying, but getting the error message: django.db.utils.OperationalError: (com_error(-2147352567, 'Exception occurred.', (0, u'ADODB.Connection', u'Provider cannot be found. It may not be properly installed.', u'C:\Windows\HELP\ADO270.CHM', 1240655, -2146824582), None), u'Error opening connection: DATA SOURCE=127.0.0.1;Initial Catalog=testdb

Connecting Django with MSSQL server

和自甴很熟 提交于 2019-12-02 01:47:34
问题 I'm trying to connect my Django app to SQL Server 2016. I've tried using django-pyodbc but it doesn't support Django 1.11. Instead I installed django-mssql 1.8. When I try to run the application I get this error. TypeError was unhandled by user code Message: 'NoneType' object is not callable At execute_from_command_line(sys.argv) in manage.py Here is my DATABASES from settings.py DATABASES = { 'default': { 'ENGINE': 'sqlserver_ado', 'NAME': 'TEST2', 'HOST': 'PCNAME\SQLEXPRESS', 'USER': '',

Django - How to prevent database foreign key constraint creation

China☆狼群 提交于 2019-11-30 13:37:19
I have a model that is backed by a database view. class OrgCode(models.Model): org_code = models.CharField(db_column=u'code',max_length=15) org_description = models.CharField(max_length=250) org_level_num = models.IntegerField() class Meta: db_table = u'view_FSS_ORG_PROFILE' I need to reference this in another model class AssessmentLocation(models.Model): name = models.CharField(max_length=150) org = models.ForeignKey(OrgCode) I can't run syncdb because foreign key constraints cannot be created referencing a view. u"Foreign key 'FK__main_asse__org__1D114BD1' references object 'view_FSS_ORG

Django - How to prevent database foreign key constraint creation

孤街醉人 提交于 2019-11-29 18:34:02
问题 I have a model that is backed by a database view. class OrgCode(models.Model): org_code = models.CharField(db_column=u'code',max_length=15) org_description = models.CharField(max_length=250) org_level_num = models.IntegerField() class Meta: db_table = u'view_FSS_ORG_PROFILE' I need to reference this in another model class AssessmentLocation(models.Model): name = models.CharField(max_length=150) org = models.ForeignKey(OrgCode) I can't run syncdb because foreign key constraints cannot be

Setting up django-mssql issues

笑着哭i 提交于 2019-11-27 15:46:04
I'm having some issues setting up django-mssql on Win Server 2008 R2. I have everything installed, however, the wiki for django-mssql says to setup the settings file similar to: DATABASES = { 'default': { 'NAME': 'my_database', 'ENGINE': 'sqlserver_ado', 'HOST': 'dbserver\\ss2008', 'USER': '', 'PASSWORD': '', 'OPTIONS' : { 'provider': 'SQLOLEDB', 'use_mars': True, }, } } When I run from my site directory: python manage.py syncdb I get an error stating it isn't an available database backend. When I installed django-mssql it seemed to install the backend here \site-packages\django_mssql-1.0.1

ImportError: No module named pythoncom

痴心易碎 提交于 2019-11-27 05:02:34
I am a newbie (just 1 week) to this Python world. I tried installing django-mssql, but when I tried to import the library (using import sqlserver_ado.dbapi ), I got this error message: ImportError: No module named pythoncom I tried to look for that library without success. Can you guys point me in the right direction? You are missing the pythoncom package. It comes with ActivePython but you can get it separately on GitHub (previously on SourceForge ) as part of pywin32. You can also simply use: pip install pywin32 Binary Phile If you're on windows you probably want the pywin32 library, which

Setting up django-mssql issues

别来无恙 提交于 2019-11-26 17:17:18
问题 I'm having some issues setting up django-mssql on Win Server 2008 R2. I have everything installed, however, the wiki for django-mssql says to setup the settings file similar to: DATABASES = { 'default': { 'NAME': 'my_database', 'ENGINE': 'sqlserver_ado', 'HOST': 'dbserver\\ss2008', 'USER': '', 'PASSWORD': '', 'OPTIONS' : { 'provider': 'SQLOLEDB', 'use_mars': True, }, } } When I run from my site directory: python manage.py syncdb I get an error stating it isn't an available database backend.