CALLABLE STATEMENT

THIS IS MY FRST QUESTION HERE ...SO A WARM HELLO TO ALL.PLEASE TELL ME HOW TO USE A CALLABLE STATEMENT WITH MS ACCESS WITH THE HELP OF A EXAMPLE.
[173 byte] By [gokul_agarwal] at [2007-9-26 1:16:48]
# 1

What's for u a callable statment ? do you mean prepared statment or stored procedure (macros,...)

For a prepared statment the syntax looks like what follows :

Connection connection;//For connection

String psQuery = "select from where Create_Time <? and Create_Time >?";

PreparedStatement ps = connection.prepareStatement(psQuery);

ps.setDate(1,mydate);

ps.setDate(2,mydate);

ps.execute();//I'm not sure for this last one but it might be around that

HTH

STF

LearningSTF at 2007-6-29 0:45:07 > top of Java-index,Archived Forums,Java Programming...
# 2
It is executeQuery or executeUpdate depending on the nature of the sql-query (the first for select and the second for insert, update and delete).PS. Never write in all caps it is like screaming.
DanielN at 2007-6-29 0:45:07 > top of Java-index,Archived Forums,Java Programming...
# 3
Its a execute query ...and execute update as well.
gokul_agarwal at 2007-6-29 0:45:07 > top of Java-index,Archived Forums,Java Programming...
# 4
I am sorry its for stored procedures!!
gokul_agarwal at 2007-6-29 0:45:07 > top of Java-index,Archived Forums,Java Programming...
# 5
refer to http://developer.java.sun.com/developer/onlineTraining/Database/JDBC20Intro/JDBC20.html#JDBC2013_4and for connecting to MS Access DBmake jdbc odbc bridgeand use sun.jdbc.odbc.JdbcOdbcDriver!!
insoft at 2007-6-29 0:45:07 > top of Java-index,Archived Forums,Java Programming...
# 6
hello everyone!Callable Statement in java is for calling the stored procedures in u'r database by passing in-out parameters as an arguement.Hope this clears u'r doubtRaj
raj_kaush at 2007-6-29 0:45:07 > top of Java-index,Archived Forums,Java Programming...