Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #81205

Re: *.sdf database access

Newsgroups comp.lang.python
Date 2014-11-21 05:59 -0800
References <0350ed7c-febf-4b56-91f0-91e3ef6b8164@n22g2000yqb.googlegroups.com> <138fa244-ee2d-4b93-8187-2483bc2750c1@i2g2000vbd.googlegroups.com>
Message-ID <91bac545-c0f7-47b4-ad78-ee5340d0b55e@googlegroups.com> (permalink)
Subject Re: *.sdf database access
From Nikhil Joshi <nyjoshi@gmail.com>

Show all headers | View raw


On Saturday, April 21, 2012 6:55:55 AM UTC-4, Alex Willmer wrote:
> On Apr 19, 9:18 pm, Page3D <pag...@gmail.com> wrote:
> > Hi, I am trying to connect and access data in a *.sdf file on Win7
> > system using Python 2.7. I have three questions:
> >
> > 1. What python module should I use? I have looked at sqlite3 and
> > pyodbc. However, I can seem to get the connection to the database file
> > setup properly.
> 
> I assume you mean SQL Server Compact by *.sdf. However please note
> that there are several several file formats matching SDF
> http://en.wikipedia.org/wiki/SDF#Computing and explicit is better than
> implicit.
> 
> The sqlite3 module won't help - that's for sqlite files, which an
> entirely different file format. Wikpedia says of SQL Server Compact
> "An ODBC driver for SQL CE does not exist, and one is not planned
> either. Native applications may use SQL CE via OLE DB"
> http://en.wikipedia.org/wiki/SQL_Server_Compact. I believe the
> adodbapi module, part of PyWin32 http://sourceforge.net/projects/pywin32/files/
> can connect over OLE DB.
> 
> > 2. How can I determine the appropriate connection string? I have
> > opened database file in Visual Studio and can see the tables. I don't
> > understand where to find the connection string in Visual Studio.
> 
> These look promising http://www.connectionstrings.com/sql-server-2005-ce
> 
> > 3. Assuming a module from (1) above, does anyone have a code snippet
> > for connecting to the database and then accessing a varbinary (image)
> > in one of the tables of the databese?
> 
> Pass, I'm afraid
> 
> Regards, Alex

Thank you for the pywin32 link, I assume the problem/issue must have been resolved as there were not posts further. I could successfully ping to the database and get the desired results, let me know if anybody still needs the connection code.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: *.sdf database access Nikhil Joshi <nyjoshi@gmail.com> - 2014-11-21 05:59 -0800

csiph-web