473,549 Members | 2,726 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

accessing an Access-query from an applet

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 }";
CallableStateme nt cal = theExistingConn ection.prepareC all(query);
cal.executeQuer y();
ResultSet r = cal.getResultSe t();

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
1 1471
On Fri, 16 Jan 2004 12:57:07 GMT, wn********@yaho o.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 }";
CallableStatem ent cal = theExistingConn ection.prepareC all(query);
cal.executeQue ry();
ResultSet r = cal.getResultSe t();

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

36
16334
by: Thomas | last post by:
after spending countless hours trying, i give up and hope to get some help in here. on server1 i got the web myweb.com with my test.asp. in the test.asp, i'm trying to read a file from an UNC path with a FSO: Set myFile = Server.CreateObject("Scripting.FileSystemObject").GetFile("\\server2\myshare\myfile.txt") this fails with an Permission...
2
2282
by: Steven T. Hatton | last post by:
I find the surprising. If I derive Rectangle from Point, I can access the members of Point inherited by Rectangle _IF_ they are actually members of a Rectangle. If I have a member of type Point in Rectangle, the compiler tells me Point::x is protected. I would have expected Rectangle to see the protected members of any Point. Compiling the...
3
4308
by: prodirect | last post by:
Hi all, I hope someone can help me. I've recently created a database and wanted to put it up on an ftp sight so that multiple people could access the same tables at the same time from different geographical locations. I have been completely unsucessful in acheiving this goal so far however. Things I have tried: Create a shortcut to ftp...
4
4863
by: Eugen Walcher | last post by:
Hello all, I've tried posting this same question on other newsgroups with no luck. This group seems to have a lot more activity so I apologize if you have seen it before. I'm trying to create a web service in c# using paradox data. The data is stored locally on my development machine with IIS also installed. Web services are working...
3
2783
by: Vivek Sharma | last post by:
Hi, I have created a dropdownlist as a web user control. I am using its multiple instances on the webpage. How do I access the selectedValue of each instance? All the instances have different IDs. Thanks Vivek
1
3114
by: CS Wong | last post by:
Hi, I have a page form where form elements are created dynamically using Javascript instead of programatically at the code-behind level. I have problems accessing the dynamically-created elements and would like to seek a solution for this. I had looked through several articles for accessing programatically-created dynamic elements such...
0
2249
by: Joergen Bech | last post by:
Fairly new to ASP.NET 1.1. Getting the error below when running application on a web server outside of my control, but only the first time I run it: 1. After a long period of inactivity (or updating the code-behind dll) accessing any aspx page in the application causes the application to run for the first time. Some of the initialization...
5
3040
by: Daniel Corbett | last post by:
I am trying to save a file dynamically created in a webpage. I get the following headers, but cannot figure out how to save the attachment. I am basically trying to replicate what internet explorer would do in this case. The headers I am getting are: Headers {Content-Disposition: attachment; filename="dynamic_file.mdb" Connection:...
3
4979
by: Olivier BESSON | last post by:
Hello, I have a web service of my own on a server (vb.net). I must declare it with SoapRpcMethod to be used with JAVA. This is a simple exemple method of my vb source : >************************************************************************ > <WebMethod(), System.Web.Services.Protocols.SoapRpcMethod()> _ > Public Function...
3
1562
by: Nathan Sokalski | last post by:
I have a validator that I wrote by inheriting from BaseValidator. At certain points in the code, I need to access other controls on the page containing the validator. I have the IDs of these controls, so I use the following statement to access them: Me.Page.FindControl(ControlID) However, this is returning Nothing, even though the control...
0
7451
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7960
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7475
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7812
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5089
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3501
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3483
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1944
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1061
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.