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

Reply via email to