Could not vew & edit data in exsiting tables - 0.8.2.9

This is the international (english) support forum for the SQLite Administrator developed and maintained by Orbmu2k.

Moderators: gto, EgonHugeist, Orbmu2k

Locked
AVI
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 11.01.2007, 09:09

Could not vew & edit data in exsiting tables - 0.8.2.9

Post by AVI »

Hi,
I have sqlite3 database. I am able to open it and see the structure of the DB but I am not able to view or edit date in tables.

When I start SQLite Administrator on the right pane I see three tabs:
SQL Query, Result, Edit Data. But immediately after I open (oe reopen) my DB Edit Data tab vanishes.

- No problems with access rights for my DB file (Admin)
- SQLite version 3.3.10
- My DB was created with SQLite 3.3.8

I have tried to use your sqlite3.dll (version 3.3.8) but nothing positive happens.

When I use other tools for SQLite admin / management I have no problems.

Could you please help?
Orbmu2k
SQLite Admin Developer
SQLite Admin Developer
Posts: 38
Joined: 07.12.2005, 07:51
Contact:

Post by Orbmu2k »

This means that SQLite Administrator runs in "SafeMode" this occurs when Table/Field/Index/View etc ... names are containing invalid tokens.
See Errorlog for detail.

This is happening because ZeosDBO does not support all type of chars inside the name of database objects ... and it also will not work with indent brackets ( "[" name "]" ).
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Hi Orbm2k,
I did some changes for a bug reported for mysql. As far as I remember this patch may impact sqlite behaviour as well. In mysql they use backticks instead of [, but maybe the [ problem is fixed. (See bug reports forum to see what changed exactly)
Oh no... Not completely. I think you should try to override GetIdentifierQuoteString of TZAbstractDatabaseMetadata in TZSQLiteDatabaseMetadata. (Default = double quote instead of []) See ADO implementation.

Can you test this? I don't use SQLite... When it works like that I'll modify our version immediately.

Mark
AVI
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 11.01.2007, 09:09

Post by AVI »

Well, there is a messsage in the log:

11.01.2007 13:38:32: "Customers&Apps_2006" invalid token detected -> switching to IgnoreInvalidToken mode

Here is SQL for Customers&Apps_2006 view - could you please tell me what is not accepted:

CREATE VIEW Customers&Apps_2006 AS
SELECT
IIC_Customers.Name_en 'Company' ,
IIC_Customers.IIC_Cust_ID 'ID' ,
IIC_Customers.Cust_Type 'Type' ,
IIC_Customers.Member_Level 'Level' ,
Projects.Actual_From 'From',
Projects.Actual_To 'To' ,
Projects.Project_Status 'Status' ,
Applications.App_Name 'Application' ,
Applications.App_Version 'Version' ,
Projects.Project_Mode 'Mode',
Projects.Prj_Prime 'Prime Brand',
Projects.Prj_What 'What',
Projects.Prj_Activity 'Activity',
People.Pers_Name_en || ' ' || People.Pers_Fam_Name_en 'IIC Person',
Applications.App_Industry 'Idustry',
Projects.Planned_From 'Planned Start',
Projects.Planned_To 'Planned End'

FROM
Projects INNER JOIN IIC_Customers ON ( Projects.IIC_Cust = IIC_Customers.IIC_Cust )
INNER JOIN Applications ON ( Applications.Proj_Related = Projects.Project_ID )
INNER JOIN People ON (People.Pers_ID = Projects.IIC_Pers)

WHERE
(Projects.Actual_To >= '2006-01-01') AND (Projects.Actual_To <= '2006-12-31')

ORDER BY Name_en, Actual_To;

???
Orbmu2k
SQLite Admin Developer
SQLite Admin Developer
Posts: 38
Joined: 07.12.2005, 07:51
Contact:

Post by Orbmu2k »

@AVI:

The invalid token in this case is the "&" in the name of the view

valid tokens are currently "0".."9","_", "a".."z", "A".."Z"

@Mark:
I will take a look on it ;-)
AVI
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 11.01.2007, 09:09

Post by AVI »

Renamed

Works

thx
Locked