Skip to content

Commit 968fd7b

Browse files
govert_cpgovert_cp
authored andcommitted
SQLiteForExcel version 0.7 - Fixed Unicode conversion bug displaying ***
1 parent 001cc25 commit 968fd7b

9 files changed

Lines changed: 20 additions & 6 deletions

File tree

Distribution/ChangeLog.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
Version 0.6 (8 April 2010)
1+
Version 0.7 (25 June 2011)
2+
==========================
3+
* Fixed Unicode string conversion bug.
4+
* Updated Distribution version of SQLite3.dll to 3.7.7.
5+
6+
Version 0.6 (8 April 2011)
27
==========================
38
* Fixed empty string bug.
49
* Added SQLiteForWord example.

Distribution/SQLite3_StdCall.dll

0 Bytes
Binary file not shown.

Distribution/SQLiteForExcel.xls

-19 KB
Binary file not shown.

Distribution/SQLiteForWord.doc

0 Bytes
Binary file not shown.

Distribution/sqlite3.dll

2.76 KB
Binary file not shown.

Source/SQLite3VBAModules/Sqlite3.bas

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
Attribute VB_Name = "Sqlite3"
12
Option Explicit
23

34
' Notes:
@@ -17,7 +18,7 @@ Public Const SQLITE_BLOB As Long = 4
1718
Public Const SQLITE_NULL As Long = 5
1819

1920
' SQLite atandard return value
20-
Public Const SQLITE_OK As Long = 0 ' Successful result
21+
Public Const SQLITE_OK As Long = 0 ' Successful result
2122
Public Const SQLITE_ERROR As Long = 1 ' SQL error or missing database
2223
Public Const SQLITE_INTERNAL As Long = 2 ' Internal logic error in SQLite
2324
Public Const SQLITE_PERM As Long = 3 ' Access permission denied
@@ -48,7 +49,7 @@ Public Const SQLITE_ROW As Long = 100 ' sqlite3_step() has another row r
4849
Public Const SQLITE_DONE As Long = 101 ' sqlite3_step() has finished executing
4950

5051
' Extended error codes
51-
Public Const SQLITE_IOERR_READ As Long = 266 ' (SQLITE_IOERR | (1<<8))
52+
Public Const SQLITE_IOERR_READ As Long = 266 '(SQLITE_IOERR | (1<<8))
5253
Public Const SQLITE_IOERR_SHORT_READ As Long = 522 '(SQLITE_IOERR | (2<<8))
5354
Public Const SQLITE_IOERR_WRITE As Long = 778 '(SQLITE_IOERR | (3<<8))
5455
Public Const SQLITE_IOERR_FSYNC As Long = 1034 '(SQLITE_IOERR | (4<<8))
@@ -152,6 +153,7 @@ Private hSQLiteLibrary As Long
152153
Private hSQLiteStdCallLibrary As Long
153154

154155
Public Function SQLite3Initialize(Optional ByVal libDir As String) As Long
156+
' A nice option here is to call SetDllDirectory, but that API is only available since Windows XP SP1.
155157
If libDir = "" Then libDir = ThisWorkbook.Path
156158
If Right(libDir, 1) <> "\" Then libDir = libDir & "\"
157159

@@ -365,8 +367,8 @@ Function Utf8PtrToString(ByVal pUtf8String As Long) As String
365367
Exit Function
366368
End If
367369

368-
Utf8PtrToString = String(cSize - 1, "*")
369-
RetVal = MultiByteToWideChar(CP_UTF8, 0, pUtf8String, cSize - 1, StrPtr(Utf8PtrToString), cSize - 1)
370+
Utf8PtrToString = String(cSize - 1, "*") ' and a termintating null char.
371+
RetVal = MultiByteToWideChar(CP_UTF8, 0, pUtf8String, -1, StrPtr(Utf8PtrToString), cSize)
370372
If RetVal = 0 Then
371373
Debug.Print "Utf8PtrToString Error:", Err.LastDllError
372374
Exit Function

Source/SQLite3_StdCall/sqlite3.def

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ sqlite3_total_changes
167167
sqlite3_trace
168168
sqlite3_transfer_bindings
169169
sqlite3_update_hook
170+
sqlite3_uri_parameter
170171
sqlite3_user_data
171172
sqlite3_value_blob
172173
sqlite3_value_bytes
@@ -180,13 +181,19 @@ sqlite3_value_text16
180181
sqlite3_value_text16be
181182
sqlite3_value_text16le
182183
sqlite3_value_type
183-
sqlite3_version
184184
sqlite3_vfs_find
185185
sqlite3_vfs_register
186186
sqlite3_vfs_unregister
187187
sqlite3_vmprintf
188188
sqlite3_vsnprintf
189+
sqlite3_vtab_config
190+
sqlite3_vtab_on_conflict
189191
sqlite3_wal_autocheckpoint
190192
sqlite3_wal_checkpoint
193+
sqlite3_wal_checkpoint_v2
191194
sqlite3_wal_hook
192195
sqlite3_win32_mbcs_to_utf8
196+
sqlite3_win32_utf8_to_mbcs
197+
winCurrentTime
198+
winDlClose
199+
winDlSym

Source/SQLite3_StdCall/sqlite3.exp

950 Bytes
Binary file not shown.

Source/SQLite3_StdCall/sqlite3.lib

1.54 KB
Binary file not shown.

0 commit comments

Comments
 (0)