Hi everybody...

 

I need connect *django *with *sql anywhere 11 database*, i follow the 
instructions on the page "SQL Anywhere Django Driver" from github.

 

I created the database with this command

C:\>dbinit -z UCA django.db --> (database created successful)

 

I started the Database Server with command

C:\>dbsrv11 django.db  --> (database server started successful)

 

I created my project with

C:\>django-admin.py startproject mysite (at this point all it's ok)

 

I edit the file mysite/mysite/settings.py and I changed the DATABASES 
setting with this

 

DATABASES = {

    'default': {

                        'ENGINE': 'sqlany_django',

                        'NAME': 'django',

                        'USER': 'dba',

                        'PASSWORD': 'sql',

                        'OPTIONS': {'eng': '2638'},

                        'HOST': 'django',

                        'PORT': '2638',

    }

}

 

The problem is, when I want sync database using this command

 

c:/mysite>python manage.py syncdb

 

 I get *"Database server not found*" error.

 

Please help me, I don't know how resolve this problem

 

Even I test the connection with a file (test_sqlany.py) this file contents 
following code

 

import sqlanydb

conn = sqlanydb.connect(uid='dba', pwd='sql', eng='django', dbn='django')

curs = conn.cursor()

curs.execute("select 'Hello, world!'")

print "SQL Anywhere says: %s" % curs.fetchone()

curs.close()

conn.close()

 

I, get get the expected output:

 

c:\>python test_sqlany.py

SQL Anywhere says: Hello, world!

 

I have an environment for test with this caracteristics

O.S.: Windows XP

DB Engine: *SQL Anywhere 11 with EBF 3069*

Python 2.7

Django 1.6.1

Setuptools installed

PIP installed

sqlanydb installed

sqlany-django installed

 

*Sorry my english is very bad :)*

 

*Here is the complete text about this error*

 

Traceback (most recent call last):

  File "manage.py", line 10, in <module>

    execute_from_command_line(sys.argv)

  File "C:\Python27\lib\site-packages\django\core\management\__init__.py", 
line 

399, in execute_from_command_line

    utility.execute()

  File "C:\Python27\lib\site-packages\django\core\management\__init__.py", 
line

392, in execute

    self.fetch_command(subcommand).run_from_argv(self.argv)

  File "C:\Python27\lib\site-packages\django\core\management\base.py", line 
242,

 in run_from_argv

    self.execute(*args, **options.__dict__)

  File "C:\Python27\lib\site-packages\django\core\management\base.py", line 
285,

 in execute

    output = self.handle(*args, **options)

  File "C:\Python27\lib\site-packages\django\core\management\base.py", line 
415,

 in handle

    return self.handle_noargs(**options)

  File 
"C:\Python27\lib\site-packages\django\core\management\commands\syncdb.py"

, line 57, in handle_noargs

    cursor = connection.cursor()

  File "C:\Python27\lib\site-packages\django\db\backends\__init__.py", line 
157,

 in cursor

    cursor = self.make_debug_cursor(self._cursor())

  File "C:\Python27\lib\site-packages\sqlany_django\base.py", line 476, in 
_curs

or

    self.connection = Database.connect(**kwargs)

  File "C:\Python27\lib\site-packages\sqlanydb.py", line 459, in connect

    return Connection(args, kwargs)

  File "C:\Python27\lib\site-packages\sqlanydb.py", line 508, in __init__

    self.handleerror(*error)

  File "C:\Python27\lib\site-packages\sqlanydb.py", line 518, in handleerror

    eh(self, None, errorclass, errorvalue)

  File "C:\Python27\lib\site-packages\sqlanydb.py", line 340, in 
standardErrorHa

ndler

    raise errorclass(errorvalue)

sqlanydb.OperationalError: *Database server not found*

 

 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/802549f8-586d-4f6e-88e2-b05d230618b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to