I figured out the problem with using the exec task and the slashes being removed. Because I am passing the directory where the sql script exists to SQLite3 in the dir property, I was able to just give the name of the file, without the path, as the second argument, and the build succeeded. I'm still curious as to how to get the jdbc driver to work, but I'm back on track with this solution.
Kyle Kimberley Software Engineer 919-474-6041 -----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Kimberley, Kyle (Hlthcr&Science) Sent: Monday, July 26, 2010 10:16 AM To: sqlite-users@sqlite.org Subject: [sqlite] using sqlitejdbc-v056 with ant build file When I run a script, using sqlitejdbc-v056, with DROP, CREATE, and INSERT statements I get this error message "java.sql.SQLException: no ResultSet available". The statement actually is successful as the data does appear in the database. I'm able to get the script to continue by including the onerror="continue" parameter, but then the build script fails. I think I can keep the script from failing by including the onerror parameter in the target, but I would prefer to have the script run without generating the errors. I've also tried using the exec task, but SQLite seems to be stripping the slashes from the path to the sql source file. I tried escaping the slashes by putting the escape slash in front of each, but I got the same result. Any help would be greatly appreciated. JDBC output example: [sql] Failed to execute: insert into table (col1, col2) values (val1, val2) [sql] java.sql.SQLException: no ResultSet available JDBC Code: <path id="sqliteclasspath.id"> <fileset dir="${basedir}\Utilities"> <include name="sqlitejdbc-v056.jar"/> </fileset> </path> <property name="sqliteclasspath" refid="sqliteclasspath.id" /> <echo message="Classpath is ${sqliteclasspath}"/> <!---output here - [echo] Classpath is C:\Clean_TestExtract\Utilities\sqlitejdbc-v056.jar -à <sql driver="org.sqlite.JDBC" url="jdbc:sqlite:${dir.source}/${dest.db.name}" userid="" password="" classpathref="sqliteclasspath.id" src="${ source.file }" onerror="continue"> </sql> Exec output example: [echo] The temporary file in BuildSQLite is C:\Clean_TestExtract\Utilities\build\debug\tempData\source.sql [exec] Error: cannot open "C:Clean_TestExtractUtilitiesbuilddebug empDatasource.sql" [exec] Result: 1 Exec code: <echo message="The temporary file in BuildSQLite is ${ source.file }"/> <exec executable="sqlite3" dir="${dir.temp}"> <arg value="${dest.db.name}"/> <arg value=".read ${source.file}"/> </exec> · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · Kyle _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users