Re: Driver caching db??

From: Brannon Jones (brannonjNOSPAM_at_gmail.com)
Date: 08/17/04


Date: Tue, 17 Aug 2004 14:49:05 -0700

The driver does not touch the database file directly. The SQL Server
process will open (and lock) the database file.

Is the database hosted in a different SQL instance, than the one you are
connecting to in Enterprise Manager?

Brannon

"JohnD" <john_nospam@tech-testing.com> wrote in message
news:hqpUc.8189$YU1.7939@newssvr22.news.prodigy.com...
> Hello,
>
> I'm not sure if this message belongs in microsoft.public.sqlserver.msde
> or is more appropriate here. Please accept my apologies if I have the
> wrong list.
>
> I've written ODBC source in C++ that accesses an MSDE instance on a
> local machine. I perform the usual steps:
>
> 1. Allocate an SQLHENV
> 2. Allocate the SQLHDBC
> 3. Connect
> 4. Execute a statement to "use " my database
> 5. Issue a simple query
> 6. Process results
> 7. Disconnect SQLHDBC
> 8. Free SQLHDBC
> 9. Free SQLHENV
> 10. Exit application
>
> Then I try to attach to the database in SQL Server Enterprise Manager
> which returns the following error:
>
> "Error 5123: CREATE FILE encountered operating system error 32 (The
> process cannot access the file because it is being used by another
> process.) while attempting to open or create the physical file:
> 'C:\mydb.mdf'.
>
> Do I need to do something different to force the driver to unload the
> database when the application ends?
>
> Thanks,
> John



Relevant Pages

  • RE: SELECT MAX(...) performance SQL Server/ODBC
    ... The query execution plan is something like this: ... I have the latest SQL Server driver dated ... >>database connectivity and MFC record set classes are used ...
    (microsoft.public.sqlserver.odbc)
  • Re: Project 2000 to mySQL Database
    ... a SQL Server database and the odd things that were ... >I recall people having trouble with the Oracle ODBC ... >the MS supplied Oracle ODBC driver. ... >> ODBC database should work. ...
    (microsoft.public.project.vba)
  • Re: Local datastore for visual basic .net aplication on a pda
    ... >>> most of the database access controls and etc available on the full .net ... >>> framework arenīt available for the .net compact framework, so, so much ... >>> database file as an local datastore without the SQL server running? ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Opening a SQL Server 2005 Database...
    ... *.mdf is not database, it is data file used by SQL Server/Express. ... The database file name only used in ConnectionString with "AttachDBFileName=..." ... I'm trying to open a SQL Server 2005 Database without creating a Data ...
    (microsoft.public.vsnet.general)
  • Re: Connection Reset Issue with MS SQL 2005
    ... What version of the SQL Server 2005 JDBC driver are you running? ... I am using an application with MS SQL 2005 Database + SQL Server 2005 ...
    (microsoft.public.sqlserver.jdbcdriver)