You are not logged in.

Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

  • "audio.rodriguez" started this thread

Posts: 1

Date of registration: Jul 17th 2013

  • Send private message

1

Wednesday, July 17th 2013, 10:45pm

example of insert, delete, update with jabaco please

i would like a example of how to insert data in mysql table.
i look in google but just show in JAVA withou JABACO.

i pure example in jabaco will be very helper :thumbsup: :thumbsup: :thumbsup: ;( ;( ;( ;(

Dani

Intermediate

Posts: 325

Date of registration: Nov 19th 2009

Location: GERMANY

  • Send private message

IAO

Beginner

  • "IAO" is male

Posts: 38

Date of registration: May 25th 2013

Location: Venezuela

Occupation: Electronic

  • Send private message

3

Thursday, July 18th 2013, 1:08pm

Hi....

Then you look the Dani program, you can see here with sqlite example.

Source code

1
2
3
4
5
http://www.jabaco.org/board/p448-sqlite-3-support.html#post448

and here

http://www.jabaco.org/board/p2154-sqlite-3-support.html#post2154


I hope this example can help you.
greetings to all..


.

jbExplorer

Trainee

Posts: 111

Date of registration: Mar 18th 2013

  • Send private message

4

Wednesday, November 6th 2013, 8:18pm

By the way, developers can also make use of Groovy functionality, in Jabaco. Instead of the Java Class.forName() syntax, you can make use of Groovy's newInstance(). I'll put together a complete sample if anyone needs one, but it's something like the following. These are snippets of a utility that imports CSV files into a Sqlite table:


'/*
' Install Groovy and attach Jars (will make compiling much slower, but you can decide if it's worth it)
' groovy-sql-2.1.7.jar
' groovy-2.1.7.jar
'*/


Import groovy.sql.DataSet
Import groovy.sql.Sql


Import java.io.*
Import java.sql.*
Import java.sql.ResultSetMetaData
Import org.sqlite.JDBC

...
...
...


sqlSQLiteInstance = groovy#sql#Sql.newInstance("jdbc:sqlite:" + sSqliteFileName, "org.sqlite.JDBC" )

sqlSQLiteInstance.execute( "DELETE FROM " + sTableName )

dsSQLite = sqlSQLiteInstance.dataSet( sTableName )

rsSQLite = sqlSQLiteInstance.getConnection.getMetaData().getColumns( Null, Null, sTableName, Null )

bResult = rsSQLite.next()
Do Until Not bResult
sColumnName = rsSQLite.getString( "COLUMN_NAME" )
sColumnType = rsSQLite.getString( "TYPE_NAME" )
lsColumnNames.add( sColumnName )
lsColumnTypes.add( sColumnType )
System.out.println sColumnName & ", "
println sColumnType
bResult = rsSQLite.next()
Loop


...
...
...


csvrReader.close()
sqlSQLiteInstance.close()

Rate this thread
WoltLab Burning Board