Hello,
I didn't manage to connect to a paradox database using your Paradox_JDBC30 api. I took your example1.java src file (from Paradox_JDBC30demo.zip) and changed the url to "jdbc:paradox:///C:/air.db" (I have a air.db paradox database file on my C drive) and I got a "java.sql.SQLException: C:/air.db isn't a database!" error message.
I downloaded another paradox database from the internet ang got the same error message. I tried other url syntax " jdbc:paradox:/C:/air.db", "jdbc:paradox:///C:\\air.db" but I had always the same error.
Could you help me with this ?
Thanks a lot.
Sylvain
|
>"jdbc:paradox:///C:/air.db"
You should use
jdbc:paradox:///C:/
or
jdbc:paradox:/C:/
|
Thanks for your help. That's the solution I also found.
For the people who get the same problem, the url isn't the complete path to the database (including the file name) but it is only the directory where the database file is.
The database is selected after that in the sql statement.
Thanks again.
|
Thanks. We will use clearer error message in the next version to tell novice why.
|
Hi, here is the novice again .. ;o)
I got some problems selecting rows in my database. The database contains several columns (matricule, name, birthdate, num... with matricule a primary key). I would like to select a particular row (for example : GER01 Sylvain 04-12-77 0001) using a select * from air.db where matricule='GER01' but this statement return the names of the columns instead of my particular row.
If I use select * from air.db where matricule="GER01", I got a invalid column GER01 error. (Please note that matricule is a varchar field).
Reading your examples, I tried select * from air.db where matricule>=all(select matricule from air.db) which returns a row with the names of the columns and a row with the last matricule and its name, birthdate, ....
I have another error when I want to insert data into the database : insert into air.db values('GER02','Marc',25-06-75,0002) returns me "Failed to insert a new record into table air - An invalid index data block at position 2048 of C:\air.PX"
I think that this error is related to the first one, certainly a sql syntax trick ?
Thanks a lot if you can help me on this one !
|
You should run once "reindex all on air;" to rebuild air.PX.
Then you can use
select * from air where matricule='GER01'
>insert into air.db values('GER02','Marc',25-06-75,0002)
You can use
insert into air values('GER02','Marc',{d '1975-06-25'},2);
If air table has more than 4 columns, you should use
insert into air (matricule, name, birthdate, num) values('GER02','Marc',{d '1975-06-25'},2);
|
Well .. it works fine ! Thanks ! :o)
|