Re: OLEDB connection string for .MDF (?)



(tommaso.gastaldi@xxxxxxxxxxx) writes:
I just cut and past the string from the VS designer. User
Instance=False would be perfectly fine.

My question was about the possibility of using the standard SQL Server
OleDb provider
to access an .MDF file.

If it where possible, it would be very useful for my purposes. I have
done a lot of attempts but either I could not figure out the right
connection string, or SQL OleDb provider does not support .mdf files:

"Provider=sqloledb;Data Source=" ... ";User ID=" & UserId &
";Password= ????

I just need a local connection. Not remote. The .mdf file is assumed to
be on the server.


AttachDBFileName is indeed recognized by SQLOLEDB.

--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • Re: OLEDB connection string for .MDF (?)
    ... I just cut and past the string from the VS designer. ... My question was about the possibility of using the standard SQL Server ... or SQL OleDb provider does not support .mdf files: ... The .mdf file is assumed to ...
    (microsoft.public.data.oledb)
  • Re: Table Truncated (Urgent)
    ... My mdf file size 17 MB, ... Is there any way to retrive the data from LDF file. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.tools)
  • Re: Problem with database filegroup restructuring in SQL Server?
    ... print 'Move db contents to MDF file' ... database '' because the 'Data Filegroup 1' filegroup is full. ... Please check Books Online, for the exact syntax. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)
  • Re: "Hidden" Replication Stored Procedures?
    ... Since the engine has hooks that hide the mssqlsystemresource database from ... 4.)Start the SQL Server service; ... Chris Jones ... aforementioned MDF file in Notepad and doing a quick search, ...
    (microsoft.public.sqlserver.replication)
  • Re: Error 823
    ... Regards. ... Microsoft SQL Server Storage Engine ... > I cannot extract much data out of the database and I can't view the most ... The problem is in the .MDF file, ...
    (microsoft.public.sqlserver.tools)