Issue 119313 - SQLITE database access via ODBC problems in 3.4 RC
Summary: SQLITE database access via ODBC problems in 3.4 RC
Status: CONFIRMED
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:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-06 02:08 UTC by Jane Atkinson
Modified: 2017-11-20 00:37 UTC (History)
4 users (show)

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


Attachments

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 libodbc.so 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("com.sun.star.sdb.DatabaseContext")
	DataSource = DatabaseContext.getByName("ex1")
	 
	If Not DataSource.IsPasswordRequired Then
	  Connection = DataSource.GetConnection("","")
	Else
	  InteractionHandler = createUnoService("com.sun.star.sdb.InteractionHandler")
	  Connection = DataSource.ConnectWithCompletion(InteractionHandler)
	End If
	 
	Statement = Connection.createStatement()
	ResultSet = Statement.executeQuery("SELECT * FROM ""Table2""") 
	 
	If Not IsNull(ResultSet) Then
	  While ResultSet.next
	    MsgBox ResultSet.getString(1)
	    MsgBox ResultSet.getInt(2)
	  Wend
	End If