I am accessing a locally stored SQLite data base with JDBC:
and it appears to fail with an error message when loading the dataset:
yet the dataset is there and I can use it.
What am I doing wrong to get this error message?
Thank you.
Martyn
Stata 18/BE
Code:
clear local jar "sqlite-jdbc-3.36.0.3.jar" local driverclass "org.sqlite.JDBC" local url "jdbc:sqlite://C:/autotransplant.sqlite" local user "user" local pass "password" jdbc connect, jar("`jar'") driverclass("`driverclass'") url("`url'") user("`user'") password("`pass'") jdbc showtables jdbc describe "summary" jdbc load, table("summary")
Code:
. jdbc showtables Database: null ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Tables ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- summary ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- . jdbc describe "summary" Table: summary ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Column name Column type ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pid INTEGER source TEXT paper TEXT year INTEGER total INTEGER succ_pc REAL succ_n INTEGER surv_pc REAL surv_n INTEGER ank_pc REAL ank_n INTEGER res_pc REAL res_n INTEGER ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- . jdbc load, table("summary") (191 observations loaded) failed to load dataset SQLite JDBC: inconsistent internal state r(683);
Code:
. d Contains data Observations: 191 Variables: 13 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Variable Storage Display Value name type format label Variable label ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pid long %12.0g pid source strL %9s source paper strL %9s paper year long %12.0g year total long %12.0g total succ_pc double %9.0g succ_pc succ_n long %12.0g succ_n surv_pc double %9.0g surv_pc surv_n long %12.0g surv_n ank_pc double %9.0g ank_pc ank_n long %12.0g ank_n res_pc double %9.0g res_pc res_n long %12.0g res_n ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Sorted by: Note: Dataset has changed since last saved.
Thank you.
Martyn
Stata 18/BE
Comment