#31 Connection.Open() fails when Compress=True on some OS's

closed-fixed
None
5
2005-03-17
2005-03-17
No

Connection.Open() fails when Compress=True on some
Operating Systems. I suspect that this was tried on a
version of Windows other than Win2000 or WinXP.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
using Finisar.SQLite;

namespace s
{
partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
SQLiteConnection conn = new SQLiteConnection();
conn.ConnectionString = "Data
Source=test.sqlite;New=True;Compress=True;Synchronous=Off";

conn.Open();
}
}
}

I have added Reference to SQLite.NET.dll and this code
give an error.

Unable to load DLL 'coredll'.

at Finisar.SQLite.Util.CreateFile(String lpFileName,
UInt32 dwDesiredAccess, UInt32 dwShareMode, IntPtr
lpSecurityAttributes, UInt32 dwCreationDispostion,
UInt32 dwFlagsAndAttributes, IntPtr hTemplateFile)
at Finisar.SQLite.Util.CompressFile(String filename)
at Finisar.SQLite.SQLiteConnection.Open()
at s.Form1.Form1_Load(Object sender, EventArgs e) in
c:\documents and settings\sergey.pc\local
settings\application data\temporary
projects\s\form1.cs:line 28

Discussion

  • Robert Foster

    Robert Foster - 2005-03-17
    • status: open --> closed
     
  • Robert Foster

    Robert Foster - 2005-03-17
    • status: closed --> closed-fixed
     
  • Robert Foster

    Robert Foster - 2005-03-17

    Logged In: YES
    user_id=526041

    Util.CompressFile() was previously only checking for WinCE
    or Unix. It's been fixed to check for PlatformID other than
    PlatformID.Win32NT.

    This needs further testing on other environments.

     

Log in to post a comment.