System.Data.SQLite

Check-in [968b6f7b1c]
Login

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

Overview
Comment:Fix compilation issues on the .NET Compact Framework 2.0.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 968b6f7b1c1b36fedd4a1748faf6087a0617e3b3
User & Date: mistachkin 2013-02-28 03:26:35.746
Context
2013-03-01
01:15
Update Eagle in externals to the beta 27 release. check-in: a0aafa8eb9 user: mistachkin tags: trunk
2013-02-28
03:26
Fix compilation issues on the .NET Compact Framework 2.0. check-in: 968b6f7b1c user: mistachkin tags: trunk
2013-02-27
22:45
Update Eagle script library in externals to the latest trunk. check-in: 40b940e610 user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to Setup/build_ce.bat.
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44

%_VECHO% Tools = '%TOOLS%'

SET BUILD_CONFIGURATIONS=Debug Release
SET BASE_CONFIGURATIONSUFFIX=Compact
SET PLATFORMS="Pocket PC 2003 (ARMV4)"
SET PROCESSORS=arm
SET YEARS=2008
SET BASE_PLATFORM=PocketPC

CALL :fn_ResetErrorLevel

%__ECHO3% CALL "%TOOLS%\build_all.bat"

IF ERRORLEVEL 1 (







|







30
31
32
33
34
35
36
37
38
39
40
41
42
43
44

%_VECHO% Tools = '%TOOLS%'

SET BUILD_CONFIGURATIONS=Debug Release
SET BASE_CONFIGURATIONSUFFIX=Compact
SET PLATFORMS="Pocket PC 2003 (ARMV4)"
SET PROCESSORS=arm
SET YEARS=2005 2008
SET BASE_PLATFORM=PocketPC

CALL :fn_ResetErrorLevel

%__ECHO3% CALL "%TOOLS%\build_all.bat"

IF ERRORLEVEL 1 (
Changes to System.Data.SQLite/SQLiteConnection.cs.
1694
1695
1696
1697
1698
1699
1700



1701

1702
1703
1704
1705
1706
1707
1708
            return null;

        StringBuilder result = new StringBuilder();

        int length = array.Length;

        for (int index = 0; index < length; index++)



            result.AppendFormat("{0:x2}", array[index]);


        return result.ToString();
    }

    /// <summary>
    /// Parses a string containing a sequence of zero or more hexadecimal
    /// encoded byte values and returns the resulting byte array.  The







>
>
>

>







1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
            return null;

        StringBuilder result = new StringBuilder();

        int length = array.Length;

        for (int index = 0; index < length; index++)
#if NET_COMPACT_20
            result.Append(String.Format("{0:x2}", array[index]));
#else
            result.AppendFormat("{0:x2}", array[index]);
#endif

        return result.ToString();
    }

    /// <summary>
    /// Parses a string containing a sequence of zero or more hexadecimal
    /// encoded byte values and returns the resulting byte array.  The
Changes to System.Data.SQLite/SQLiteLog.cs.
493
494
495
496
497
498
499

500
501
502
503
504
505
506
        /// <param name="sender">Should be null.</param>
        /// <param name="e">The data associated with this event.</param>
        private static void LogEventHandler(
            object sender,
            LogEventArgs e
            )
        {

            if (e == null)
                return;

            string message = e.Message;

            if (message == null)
            {







>







493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
        /// <param name="sender">Should be null.</param>
        /// <param name="e">The data associated with this event.</param>
        private static void LogEventHandler(
            object sender,
            LogEventArgs e
            )
        {
#if !NET_COMPACT_20
            if (e == null)
                return;

            string message = e.Message;

            if (message == null)
            {
520
521
522
523
524
525
526

527
528
529
            if (errorCode is SQLiteErrorCode)
                success = ((SQLiteErrorCode)errorCode == SQLiteErrorCode.Ok);
            else if (errorCode is int)
                success = ((int)errorCode == 0);

            Trace.WriteLine(String.Format("SQLite {0} ({1}): {2}",
                success ? "message" : "error", errorCode, message));

        }
    }
}







>



521
522
523
524
525
526
527
528
529
530
531
            if (errorCode is SQLiteErrorCode)
                success = ((SQLiteErrorCode)errorCode == SQLiteErrorCode.Ok);
            else if (errorCode is int)
                success = ((int)errorCode == 0);

            Trace.WriteLine(String.Format("SQLite {0} ({1}): {2}",
                success ? "message" : "error", errorCode, message));
#endif
        }
    }
}