Search Results

Search found 5 results on 1 pages for 'pymssql'.

Page 1/1 | 1 

  • Can't connect to SQL Server 2005 Express from an ASP.NET C# page

    - by Aviv
    Hey guys, I have an MS SQL Server 2005 Express running on a VPS. I'm using pymssql in Python to connect to my server with the following code: conn = pymssql.connect(host='host:port', user='me', password='pwd', database='db') and it works perfectly. When I try to connect to the server from an ASP.NET C# page with the following code: SqlConnection myConnection = new SqlConnection("Data Source=host,port;Network Library=DBMSSOCN; Initial Catalog=db;User ID=me;Password=pwd;"); myConnection.Open(); When I run the ASP.NET page I get the following exception at myConnection.Open();: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.) I tried restarting the SQL Server but I had no luck. Can anyone point me out to what I'm missing here? Thanks!

    Read the article

  • Convert or strip out "illegal" Unicode characters

    - by Oli
    I've got a database in MSSQL that I'm porting to SQLite/Django. I'm using pymssql to connect to the database and save a text field to the local SQLite database. However for some characters, it explodes. I get complaints like this: UnicodeDecodeError: 'ascii' codec can't decode byte 0x97 in position 1916: ordinal not in range(128) Is there some way I can convert the chars to proper unicode versions? Or strip them out?

    Read the article

  • Python - Linux - Connecting to MS SQL with Windows Credentials - FreeTDS+UnixODBC + pyodbc or pymssq

    - by Keith P
    There doesn't seem to be any great instructions for setting this up. Does anyone have any good instructions? I am a linux noob so be gentle. I did see another post that is similar, but no real answer. I have a couple of problems. FreeTDS doesn't "seem" to be working. I am trying to connect and I get the following message using the "tsql" command: "Default database being set to databaseName There was a problem connecting to the server" but it doesn't mention what the problem is. The error I get when I try to connect using pyodbc is: "pyodbc.Error: ('08S01', '[08S01] [unixODBC][FreeTDS][SQL Server]Unable to connect: Adaptive Server is unavailable or does not exist (20009) (SQLDriverConnectW)')" I tried something similar with pymssql, but I ran into similar issues. I keep getting errors that I can't connect, but it doesn't tell me why.

    Read the article

  • Copy whole SQL Server database into JSON from Python

    - by Oli
    I facing an atypical conversion problem. About a decade ago I coded up a large site in ASP. Over the years this turned into ASP.NET but kept the same database. I've just re-done the site in Django and I've copied all the core data but before I cancel my account with the host, I need to make sure I've got a long-term backup of the data so if it turns out I'm missing something, I can copy it from a local copy. To complicate matters, I no longer have Windows. I moved to Ubuntu on all my machines some time back. I could ask the host to send me a backup but having no access to a machine with MSSQL, I wouldn't be able to use that if I needed to. So I'm looking for something that does: db = {} for table in database: db[table.name] = [row for row in table] And then I could serialize db off somewhere for later consumption... But how do I do the table iteration? Is there an easier way to do all of this? Can MSSQL do a cross-platform SQLDump (inc data)? For previous MSSQL I've used pymssql but I don't know how to iterate the tables and copy rows (ideally with column headers so I can tell what the data is). I'm not looking for much code but I need a poke in the right direction.

    Read the article

  • exe created by py2exe give error

    - by user283405
    i have created an exe from py2exe. After successfully creating the exe, i got the following error when i run main.exe. File "_mssql.pyc", line 12, in <module> File "_mssql.pyc", line 10, in __load ImportError: DLL load failed: The specified module could not be found. I am using pymssql module for sql server.

    Read the article

1