System.Data.SQLite
Check-in [320bc6d729]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Prerelease
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | sourceforge
Files: files | file ages | folders
SHA1: 320bc6d72954a53d18e0ac81d8abae859953b6d9
User & Date: rmsimpson 2006-02-25 17:09:54
Context
2006-02-25
17:10
Finally some toolbox icons check-in: 39050c87c5 user: rmsimpson tags: sourceforge
17:09
Prerelease check-in: 320bc6d729 user: rmsimpson tags: sourceforge
07:50
Work in progress check-in: 059f612efa user: rmsimpson tags: sourceforge
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to SQLite.Designer/AssemblyInfo.cs.

28
29
30
31
32
33
34
35
36
37
38
39
//      Major Version
//      Minor Version 
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Revision and Build Numbers 
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.26.0")]
[assembly: AssemblyFileVersion("1.0.26.0")]
[assembly: AssemblyDelaySignAttribute(false)]
[assembly: AssemblyKeyFileAttribute("..\\System.Data.SQLite\\System.Data.SQLite.snk")]
[assembly: AssemblyKeyNameAttribute("")]







|
|



28
29
30
31
32
33
34
35
36
37
38
39
//      Major Version
//      Minor Version 
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Revision and Build Numbers 
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.27.0")]
[assembly: AssemblyFileVersion("1.0.27.0")]
[assembly: AssemblyDelaySignAttribute(false)]
[assembly: AssemblyKeyFileAttribute("..\\System.Data.SQLite\\System.Data.SQLite.snk")]
[assembly: AssemblyKeyNameAttribute("")]

Changes to SQLite.Interop/SQLite.Interop.rc.

49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
..
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81

/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 1,0,26,2
 PRODUCTVERSION 1,0,0,0
 FILEFLAGSMASK 0x17L
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
................................................................................
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904b0"
        BEGIN
            VALUE "Comments", "http://sqlite.phxsoftware.com"
            VALUE "FileDescription", "SQLite.NET Interop Library"
            VALUE "FileVersion", "1.0.26.2"
            VALUE "InternalName", "SQLite.Interop.DLL"
            VALUE "LegalCopyright", "Released to the public domain"
            VALUE "OriginalFilename", "SQLite3.DLL 3.3.4"
            VALUE "ProductName", "SQLite.NET"
            VALUE "ProductVersion", "1.0"
        END
    END







|







 







|







49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
..
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81

/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 1,0,27,0
 PRODUCTVERSION 1,0,0,0
 FILEFLAGSMASK 0x17L
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
................................................................................
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904b0"
        BEGIN
            VALUE "Comments", "http://sqlite.phxsoftware.com"
            VALUE "FileDescription", "SQLite.NET Interop Library"
            VALUE "FileVersion", "1.0.27.0"
            VALUE "InternalName", "SQLite.Interop.DLL"
            VALUE "LegalCopyright", "Released to the public domain"
            VALUE "OriginalFilename", "SQLite3.DLL 3.3.4"
            VALUE "ProductName", "SQLite.NET"
            VALUE "ProductVersion", "1.0"
        END
    END

Changes to SQLite.Interop/SQLite.Interop.vcproj.

107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
			/>
			<Tool
				Name="VCWebDeploymentTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
				Description="Merging binaries ..."
				CommandLine="..\bin\tools\mergebin.exe /S:.clr ..\System.Data.SQLite\bin\$(TargetFileName) $(TargetPath)&#x0D;&#x0A;sn -Ra $(TargetPath) ..\System.Data.SQLite\System.Data.SQLite.snk&#x0D;&#x0A;COPY $(TargetDir)System.Data.SQLite.* $(VSInstallDir)Common7\IDE\PublicAssemblies&#x0D;&#x0A;"
			/>
		</Configuration>
		<Configuration
			Name="Release|Pocket PC 2003 (ARMV4)"
			OutputDirectory="Pocket PC 2003 (ARMV4)\$(ConfigurationName)"
			IntermediateDirectory="Pocket PC 2003 (ARMV4)\$(ConfigurationName)"
			ConfigurationType="2"







|







107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
			/>
			<Tool
				Name="VCWebDeploymentTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
				Description="Merging binaries ..."
				CommandLine="..\bin\tools\mergebin.exe /S:.clr ..\System.Data.SQLite\bin\$(TargetFileName) $(TargetPath)&#x0D;&#x0A;sn -Ra $(TargetPath) ..\System.Data.SQLite\System.Data.SQLite.snk&#x0D;&#x0A;"
			/>
		</Configuration>
		<Configuration
			Name="Release|Pocket PC 2003 (ARMV4)"
			OutputDirectory="Pocket PC 2003 (ARMV4)\$(ConfigurationName)"
			IntermediateDirectory="Pocket PC 2003 (ARMV4)\$(ConfigurationName)"
			ConfigurationType="2"

Changes to System.Data.SQLite/AssemblyInfo.cs.

35
36
37
38
39
40
41
42
43
44
45
//      Major Version
//      Minor Version 
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Revision and Build Numbers 
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.26.2")]
#if !PLATFORM_COMPACTFRAMEWORK
[assembly: AssemblyFileVersion("1.0.26.2")]
#endif







|

|

35
36
37
38
39
40
41
42
43
44
45
//      Major Version
//      Minor Version 
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Revision and Build Numbers 
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.27.0")]
#if !PLATFORM_COMPACTFRAMEWORK
[assembly: AssemblyFileVersion("1.0.27.0")]
#endif

Changes to System.Data.SQLite/SQLiteParameterCollection.cs.

247
248
249
250
251
252
253





254
255
256
257
258
259
260
261
262
263
264
265





266
267
268
269
270
271
272
    /// Returns a count of parameters in the collection
    /// </summary>
    public override int Count
    {
      get { return _parameterList.Count; }
    }






    public new SQLiteParameter this[string parameterName]
    {
      get
      {
        return (SQLiteParameter)GetParameter(parameterName);
      }
      set
      {
        SetParameter(parameterName, value);
      }
    }






    public new SQLiteParameter this[int index]
    {
      get
      {
        return (SQLiteParameter)GetParameter(index);
      }
      set







>
>
>
>
>












>
>
>
>
>







247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
    /// Returns a count of parameters in the collection
    /// </summary>
    public override int Count
    {
      get { return _parameterList.Count; }
    }

    /// <summary>
    /// Overloaded to specialize the return value of the default indexer
    /// </summary>
    /// <param name="parameterName">Name of the parameter to get/set</param>
    /// <returns>The specified named SQLite parameter</returns>
    public new SQLiteParameter this[string parameterName]
    {
      get
      {
        return (SQLiteParameter)GetParameter(parameterName);
      }
      set
      {
        SetParameter(parameterName, value);
      }
    }

    /// <summary>
    /// Overloaded to specialize the return value of the default indexer
    /// </summary>
    /// <param name="index">The index of the parameter to get/set</param>
    /// <returns>The specified SQLite parameter</returns>
    public new SQLiteParameter this[int index]
    {
      get
      {
        return (SQLiteParameter)GetParameter(index);
      }
      set

Changes to bin/System.Data.SQLite.dll.

cannot compute difference between binary files

Changes to bin/test.exe.

cannot compute difference between binary files

Changes to tools/install/InstallDesigner.cs.

29
30
31
32
33
34
35









36
37
38
39
40
41
42
..
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
...
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
...
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
...
217
218
219
220
221
222
223
224
225
226
227
228

229
230

231
232
233

234
235

236

237
238

239
240
241
242
243
244
245
246
247

248
249
250
251
252
253
254
255
256
257
258






259























260
261
262
263




























264
265
266
267
268
269
270
271
272
273
274
275
276
277
278

279
280
281
282
283
284
285








286






287
288
289
290
291
292
293
...
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
...
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
    private static Guid jetAltDataSourcesGuid = new Guid("{466CE797-67A4-4495-B75C-A3FD282E7FC4}");
    private static string[] compactFrameworks = new string[] { "PocketPC", "SmartPhone", "WindowsCE" };

    private string _regRoot = "8.0";
    private System.Reflection.Assembly _assm = null;
    private bool _ignoreChecks = true;
    private string _assmLocation;










    System.Reflection.Assembly SQLite
    {
      get
      {
        if (_assm == null)
        {
................................................................................
            _assm = System.Reflection.Assembly.LoadFrom(_assmLocation);
          }
          catch
          {
          }
        }

        //if (_assm == null)
        //{
        //  try
        //  {
        //    _assmLocation = Path.GetFullPath("..\\x64\\System.Data.SQLite.DLL");
        //    _assm = System.Reflection.Assembly.LoadFrom(_assmLocation);
        //  }
        //  catch
        //  {
        //  }
        //}

        //if (_assm == null)
        //{
        //  try
        //  {
        //    _assmLocation = Path.GetFullPath("..\\itanium\\System.Data.SQLite.DLL");
        //    _assm = System.Reflection.Assembly.LoadFrom(_assmLocation);
        //  }
        //  catch
        //  {
        //  }
        //}

        OpenFileDialog dlg = new OpenFileDialog();
        while (_assm == null)
        {
          dlg.Multiselect = false;
          dlg.InitialDirectory = Environment.CurrentDirectory;
          dlg.FileName = "System.Data.SQLite.DLL";
          dlg.Filter = "System.Data.SQLite.DLL|System.Data.SQLite.DLL";
................................................................................

        warningPanel.Visible = (AddItem(key, "VCSExpress", "Visual C# Express Edition *", oledbDataProviderGuid, oledbAltDataProviderGuid)
         | AddItem(key, "VCExpress", "Visual C++ Express Edition *", oledbDataProviderGuid, oledbAltDataProviderGuid)
         | AddItem(key, "VBExpress", "Visual Basic Express Edition *", oledbDataProviderGuid, oledbAltDataProviderGuid)
         | AddItem(key, "VJSExpress", "Visual J# Express Edition *", oledbDataProviderGuid, oledbAltDataProviderGuid));
      }

      CheckGac();

      _ignoreChecks = false;
    }

    private bool AddItem(RegistryKey parent, string subkeyname, string itemName, Guid lookFor, object isChecked)
    {
      RegistryKey subkey;
................................................................................

    private void installList_ItemChecked(object sender, ItemCheckedEventArgs e)
    {
      if (_ignoreChecks) return;

      DoInstallUninstall(e.Item);

      CheckGac();
    }

    private void DoInstallUninstall(ListViewItem Item)
    {
      if (Item.Checked == false)
      {
        if (Item.Text.IndexOf('*') > -1)
................................................................................
        if (Item.Text.IndexOf('*') > -1)
          ReplaceJet((string)Item.Tag);
        else
          Install((string)Item.Tag, standardDataProviderGuid, standardDataSourcesGuid);
      }
    }

    private void CheckGac()
    {
      bool install = false;
      bool installed;


      try
      {

        string file = AssemblyCache.QueryAssemblyInfo("System.Data.SQLite");
        installed = true;
      }

      catch
      {

        installed = false;

      }


      for (int n = 0; n < installList.Items.Count; n++)
      {
        if (installList.Items[n].Checked == true)
        {
          install = true;
          break;
        }
      }


      if (install)
      {
        string path = SQLite.ToString();

        path = Path.GetDirectoryName(_assmLocation);

        using (RegistryKey key = Registry.LocalMachine.CreateSubKey("Software\\Microsoft\\.NETFramework\\v2.0.50727\\AssemblyFoldersEx\\SQLite", RegistryKeyPermissionCheck.ReadWriteSubTree))
        {
          key.SetValue(null, path);
        }
      }






      else























      {
        try
        {
          Registry.LocalMachine.DeleteSubKey("Software\\Microsoft\\.NETFramework\\v2.0.50727\\AssemblyFoldersEx\\SQLite");




























        }
        catch
        {
        }
      }

      try
      {
        if (installed)
        {
          AssemblyCacheUninstallDisposition disp;

          AssemblyCacheEnum entries = new AssemblyCacheEnum("System.Data.SQLite");

          string s;

          while (true)
          {
            s = entries.GetNextAssembly();
            if (String.IsNullOrEmpty(s)) break;

            AssemblyCache.UninstallAssembly(s, null, out disp);
          }








          SQLite = null;






        }
      }
      catch
      {
        throw;
      }
    }
................................................................................
              subkey.SetValue("InvariantName", "System.Data.SQLite");
              subkey.SetValue("RuntimeAssembly", "System.Data.SQLite.DLL");
            }
          }
        }
      }

      string path = Path.GetDirectoryName(_assmLocation);

      while (String.IsNullOrEmpty(path) == false)
      {
        if (File.Exists(path + "\\CompactFramework\\System.Data.SQLite.DLL") == false)
        {
          path = Path.GetDirectoryName(path);
        }
        else break;
      }

      if (String.IsNullOrEmpty(path) == false)
      {
        path += "\\CompactFramework\\";

        for (int n = 0; n < compactFrameworks.Length; n++)
        {
          using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\.NETCompactFramework\\v2.0.0.0\\{0}\\AssemblyFoldersEx", compactFrameworks[n]), true))
          {

            if (key != null)
            {
              using (RegistryKey subkey = key.CreateSubKey("SQLite", RegistryKeyPermissionCheck.ReadWriteSubTree))
              {
                subkey.SetValue(null, path);
              }
            }
          }
        }
      }

#if USEPACKAGE
      using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\8.0\\Packages", keyname), true))
      {
        using (RegistryKey subkey = key.CreateSubKey("{DCBE6C8D-0E57-4099-A183-98FF74C64D9C}", RegistryKeyPermissionCheck.ReadWriteSubTree))
        {
          subkey.SetValue(null, "SQLite Designer Package");
................................................................................
        {
          if (key != null) key.DeleteSubKeyTree(provider.ToString("B"));
        }
        using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\DataSources", keyname, _regRoot), true))
        {
          if (key != null) key.DeleteSubKeyTree(source.ToString("B"));
        }

        for (int n = 0; n < compactFrameworks.Length; n++)
        {
          using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\.NETCompactFramework\\v2.0.0.0\\{0}\\DataProviders", compactFrameworks[n]), true))
          {
            try
            {
              if (key != null) key.DeleteSubKey(standardDataProviderGuid.ToString("B"));
            }
            catch
            {
            }
          }
        }

        for (int n = 0; n < compactFrameworks.Length; n++)
        {
          using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\.NETCompactFramework\\v2.0.0.0\\{0}\\AssemblyFoldersEx", compactFrameworks[n]), true))
          {
            try
            {
              if (key != null) key.DeleteSubKey("SQLite");
            }
            catch
            {
            }
          }
        }
      }
      catch
      {
      }

      // Remove factory support from the development environment config file
      string xmlFileName;







>
>
>
>
>
>
>
>
>







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|







 







|







 







|


|

>
|
<
>
|
|
<
>
|
<
>
|
>
|
<
>









>


<
<
|





|
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>








|



<
<

>







>
>
>
>
>
>
>
>
|
>
>
>
>
>
>







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
..
57
58
59
60
61
62
63
























64
65
66
67
68
69
70
...
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
...
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
...
202
203
204
205
206
207
208
209
210
211
212
213
214
215

216
217
218

219
220

221
222
223
224

225
226
227
228
229
230
231
232
233
234
235
236
237


238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318


319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
...
486
487
488
489
490
491
492






























493
494
495
496
497
498
499
...
601
602
603
604
605
606
607




























608
609
610
611
612
613
614
    private static Guid jetAltDataSourcesGuid = new Guid("{466CE797-67A4-4495-B75C-A3FD282E7FC4}");
    private static string[] compactFrameworks = new string[] { "PocketPC", "SmartPhone", "WindowsCE" };

    private string _regRoot = "8.0";
    private System.Reflection.Assembly _assm = null;
    private bool _ignoreChecks = true;
    private string _assmLocation;

    string SQLiteLocation
    {
      get
      {
        System.Reflection.Assembly assm = SQLite;
        return _assmLocation;
      }
    }

    System.Reflection.Assembly SQLite
    {
      get
      {
        if (_assm == null)
        {
................................................................................
            _assm = System.Reflection.Assembly.LoadFrom(_assmLocation);
          }
          catch
          {
          }
        }

























        OpenFileDialog dlg = new OpenFileDialog();
        while (_assm == null)
        {
          dlg.Multiselect = false;
          dlg.InitialDirectory = Environment.CurrentDirectory;
          dlg.FileName = "System.Data.SQLite.DLL";
          dlg.Filter = "System.Data.SQLite.DLL|System.Data.SQLite.DLL";
................................................................................

        warningPanel.Visible = (AddItem(key, "VCSExpress", "Visual C# Express Edition *", oledbDataProviderGuid, oledbAltDataProviderGuid)
         | AddItem(key, "VCExpress", "Visual C++ Express Edition *", oledbDataProviderGuid, oledbAltDataProviderGuid)
         | AddItem(key, "VBExpress", "Visual Basic Express Edition *", oledbDataProviderGuid, oledbAltDataProviderGuid)
         | AddItem(key, "VJSExpress", "Visual J# Express Edition *", oledbDataProviderGuid, oledbAltDataProviderGuid));
      }

      GlobalAddRemove();

      _ignoreChecks = false;
    }

    private bool AddItem(RegistryKey parent, string subkeyname, string itemName, Guid lookFor, object isChecked)
    {
      RegistryKey subkey;
................................................................................

    private void installList_ItemChecked(object sender, ItemCheckedEventArgs e)
    {
      if (_ignoreChecks) return;

      DoInstallUninstall(e.Item);

      GlobalAddRemove();
    }

    private void DoInstallUninstall(ListViewItem Item)
    {
      if (Item.Checked == false)
      {
        if (Item.Text.IndexOf('*') > -1)
................................................................................
        if (Item.Text.IndexOf('*') > -1)
          ReplaceJet((string)Item.Tag);
        else
          Install((string)Item.Tag, standardDataProviderGuid, standardDataSourcesGuid);
      }
    }

    private void GlobalAddRemove()
    {
      bool install = false;
//      bool installed;

      //// Check to see if SQLite is installed in the GAC
      //try

      //{
      //  string file = AssemblyCache.QueryAssemblyInfo("System.Data.SQLite");
      //  installed = true;

      //}
      //catch

      //{
      //  installed = false;
      //}


      // Check to see if any checkboxes in the list are checked
      for (int n = 0; n < installList.Items.Count; n++)
      {
        if (installList.Items[n].Checked == true)
        {
          install = true;
          break;
        }
      }

      // If at least 1 item is checked, then install some global settings
      if (install)
      {


        string path = Path.GetDirectoryName(SQLiteLocation);

        using (RegistryKey key = Registry.LocalMachine.CreateSubKey("Software\\Microsoft\\.NETFramework\\v2.0.50727\\AssemblyFoldersEx\\SQLite", RegistryKeyPermissionCheck.ReadWriteSubTree))
        {
          key.SetValue(null, path);
        }

        while (String.IsNullOrEmpty(path) == false)
        {
          if (File.Exists(path + "\\CompactFramework\\System.Data.SQLite.DLL") == false)
          {
            path = Path.GetDirectoryName(path);
          }
          else break;
        }

        if (String.IsNullOrEmpty(path) == false)
        {
          path += "\\CompactFramework\\";

          for (int n = 0; n < compactFrameworks.Length; n++)
          {
            using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\.NETCompactFramework\\v2.0.0.0\\{0}\\AssemblyFoldersEx", compactFrameworks[n]), true))
            {

              if (key != null)
              {
                using (RegistryKey subkey = key.CreateSubKey("SQLite", RegistryKeyPermissionCheck.ReadWriteSubTree))
                {
                  subkey.SetValue(null, path);
                }
              }
            }
          }
        }
      }
      else // No checkboxes are checked, remove some global settings
      {
        try
        {
          Registry.LocalMachine.DeleteSubKey("Software\\Microsoft\\.NETFramework\\v2.0.50727\\AssemblyFoldersEx\\SQLite");

          for (int n = 0; n < compactFrameworks.Length; n++)
          {
            using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\.NETCompactFramework\\v2.0.0.0\\{0}\\DataProviders", compactFrameworks[n]), true))
            {
              try
              {
                if (key != null) key.DeleteSubKey(standardDataProviderGuid.ToString("B"));
              }
              catch
              {
              }
            }
          }

          for (int n = 0; n < compactFrameworks.Length; n++)
          {
            using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\.NETCompactFramework\\v2.0.0.0\\{0}\\AssemblyFoldersEx", compactFrameworks[n]), true))
            {
              try
              {
                if (key != null) key.DeleteSubKey("SQLite");
              }
              catch
              {
              }
            }
          }
        }
        catch
        {
        }
      }

      try
      {
        if (!install) // Remove SQLite from the GAC if its there
        {
          AssemblyCacheUninstallDisposition disp;



          string s;
          AssemblyCacheEnum entries = new AssemblyCacheEnum("System.Data.SQLite");
          while (true)
          {
            s = entries.GetNextAssembly();
            if (String.IsNullOrEmpty(s)) break;

            AssemblyCache.UninstallAssembly(s, null, out disp);
          }

          entries = new AssemblyCacheEnum("SQLite.Designer");
          while (true)
          {
            s = entries.GetNextAssembly();
            if (String.IsNullOrEmpty(s)) break;

            AssemblyCache.UninstallAssembly(s, null, out disp);
          } SQLite = null;
        }
        else // Install SQLite into the GAC
        {

          AssemblyCache.InstallAssembly(SQLiteLocation, null, AssemblyCommitFlags.Default);
          AssemblyCache.InstallAssembly(Path.GetFullPath("SQLite.Designer.DLL"), null, AssemblyCommitFlags.Default);
        }
      }
      catch
      {
        throw;
      }
    }
................................................................................
              subkey.SetValue("InvariantName", "System.Data.SQLite");
              subkey.SetValue("RuntimeAssembly", "System.Data.SQLite.DLL");
            }
          }
        }
      }
































#if USEPACKAGE
      using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\8.0\\Packages", keyname), true))
      {
        using (RegistryKey subkey = key.CreateSubKey("{DCBE6C8D-0E57-4099-A183-98FF74C64D9C}", RegistryKeyPermissionCheck.ReadWriteSubTree))
        {
          subkey.SetValue(null, "SQLite Designer Package");
................................................................................
        {
          if (key != null) key.DeleteSubKeyTree(provider.ToString("B"));
        }
        using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format("Software\\Microsoft\\{0}\\{1}\\DataSources", keyname, _regRoot), true))
        {
          if (key != null) key.DeleteSubKeyTree(source.ToString("B"));
        }




























      }
      catch
      {
      }

      // Remove factory support from the development environment config file
      string xmlFileName;