Issue 119313 - SQLite ODBC memo/text as primary key does not read
Summary: SQLite ODBC memo/text as primary key does not read
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: 3.4.0 Beta (OOo)
Hardware: PC Linux, all
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2012-05-06 02:08 UTC by Jane Atkinson
Modified: 2020-07-08 15:22 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.1.7
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description Jane Atkinson 2012-05-06 02:08:41 UTC
I have been using OOo 3.3 successfully as the front end to several SQLite databases.

Since installing 3.4 RC I've noticed that one field in two databases (identical structure - different data) does not display. The field in question is a primary key field and contains membership numbers (but is defined as text).

Oddly enough, I can create a new record and write to that field, but it still doesn't display.

I wanted to test if this would happen in a new database, but on trying to connect to the new one, I got this error message:

Could not load the program library or it is corrupted. The ODBC data source selection is not available.

The OS is Ubuntu 12.04 32-bit and the AOO build is AOO340m1(Build:9590) - Rev. 1327774

Removing AOO 3.4 and reinstalling OOo 3.3 solves the problem.
Comment 1 r4zoli 2012-05-06 19:33:18 UTC
I can confirm it with same version under Ubuntu 12.04 when I try to create new file with ODBC option, and select ODBC-datasource on system, I get same error. 
This is a general ODBC connection problem under linux, same happens under opensuse 12.1.

This function works under Win7 without problem.
Comment 2 r4zoli 2012-05-06 19:35:48 UTC
Change assignee.
Comment 3 damjan 2017-11-20 00:37:15 UTC
Confirming in latest SVN.

It appears that both char and varchar primary key columns have empty fields in the table view window. This happens in both 32 and 64 bit.

Interestingly if the query is done through the following macro, the correct results are returned. So the database driver works. It must be a bug in a higher layer, such as the rowset or the table view window.

	Dim DatabaseContext As Object
	Dim DataSource As Object
	Dim Connection As Object
	Dim InteractionHandler as Object
	Dim Statement As Object
	Dim ResultSet As Object
	DatabaseContext = createUnoService("")
	DataSource = DatabaseContext.getByName("ex1")
	If Not DataSource.IsPasswordRequired Then
	  Connection = DataSource.GetConnection("","")
	  InteractionHandler = createUnoService("")
	  Connection = DataSource.ConnectWithCompletion(InteractionHandler)
	End If
	Statement = Connection.createStatement()
	ResultSet = Statement.executeQuery("SELECT * FROM ""Table2""") 
	If Not IsNull(ResultSet) Then
	    MsgBox ResultSet.getString(1)
	    MsgBox ResultSet.getInt(2)
	End If
Comment 4 oooforum (fr) 2020-07-08 07:32:55 UTC
Same issue with the ODBC driver sqliteodbc_w64.exe provided by:
Comment 5 oooforum (fr) 2020-07-08 15:22:19 UTC
Fixed for LibO side:

But effort could be raised with a native SDBC driver: see issue #32117