By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,986 Members | 2,030 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,986 IT Pros & Developers. It's quick & easy.

accessing an Access-query from an applet

P: n/a
Dear all,

Maybe I'm stupid, in any case I'm stupefied by now. Please help.

Stored procedures in Access should be accessible from a java-applet throught
a callable statement, but all I get is error messages from Access, which
tell me nothing.

Can anybody tell me what is wrong with the following:

In an Access database, I have a selectionquery called TEST, which simply
yields a set of string values:

This is the query in the database:
SELECT name FROM dogs

The output should be someting like:
Spot
George
Fido
....

Now this is the Java-call:
String query = "{ ? = call test }";
CallableStatement cal = theExistingConnection.prepareCall(query);
cal.executeQuery();
ResultSet r = cal.getResultSet();

The execute-statement fails, returning SQLException 70002: field COUNT is
incorrect. Why?

And while we're at it, is there a CLEAR example anywhere on the net of
stored-procedure calls and what parameters to set and why?

Thanks in advance,

WS
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Fri, 16 Jan 2004 12:57:07 GMT, wn********@yahoo.com wrote:

I'm on thin ice with Java, but the SELECT query has a problem in that
it uses a reserved word. Try modifying your table and then use:
SELECT DogName from Dogs
Or if you must:
SELECT [name] FROM dogs

Also make sure executeQuery is indeed the right method to run a SELECT
query, and that it is not just used for ACTION queries (i.e. UPDATE,
APPEND etc).

What happened to Fluffy?

-Tom.

Dear all,

Maybe I'm stupid, in any case I'm stupefied by now. Please help.

Stored procedures in Access should be accessible from a java-applet throught
a callable statement, but all I get is error messages from Access, which
tell me nothing.

Can anybody tell me what is wrong with the following:

In an Access database, I have a selectionquery called TEST, which simply
yields a set of string values:

This is the query in the database:
SELECT name FROM dogs

The output should be someting like:
Spot
George
Fido
...

Now this is the Java-call:
String query = "{ ? = call test }";
CallableStatement cal = theExistingConnection.prepareCall(query);
cal.executeQuery();
ResultSet r = cal.getResultSet();

The execute-statement fails, returning SQLException 70002: field COUNT is
incorrect. Why?

And while we're at it, is there a CLEAR example anywhere on the net of
stored-procedure calls and what parameters to set and why?

Thanks in advance,

WS


Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.