المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : SQL Query of HKEY_LOCAL_MACHINE



C# Programming
08-18-2009, 07:42 PM
I need to perform a query on the files located in the Registry. I am obviously doing something wrong because I am receiving this error: Format of the initialization string does not conform to specification starting at index 0.

string databasePath = "\\HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Shared Tools\\Web Server Extensions\\12.0\\Secure\\ConfigDB";
SqlConnection conn = new SqlConnection(databasePath);
string queryClasses = "SELECT dbo.AllDocs.Id, dbo.AllDocs.LeafName, dbo.AllDocs.TimeLastModified
FROM dbo.AllDocs LEFT OUTER JOIN dbo.RecycleBin ON dbo.AllDocs.Id = dbo.RecycleBin.DocId
WHERE (dbo.RecycleBin.DocId IS NULL) AND (dbo.AllDocs.Extension = 'zip')";

Help.