Hello, I managed to solve my problem...
I did so
[code]
File f = new File("/scripts/myDb.sql");
InputStream i = new FileInputStream(f);
Scanner sc = new Scanner(i);
StringBuffer str = new StringBuffer();
while(sc.hasNext()){
str.append(sc.nextLine());
str.append("\n");
}
//System.out.println(str);
PreparedStatement stm =
this.con.prepareStatement(str.toString());
stm.execute();
stm.close();
[/code]
is working. ;-)
thanks.
On 7 nov, 16:00, the nigga <[email protected]> wrote:
> Hello
>
> I have a file.txt with my database structure, how can I execute this
> file to create database ?
> This file did exported with DBVisualizer and now I want to create the
> database internally with my app.
>
> thanks.
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en.