Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
Old 05-01-2007, 01:20 PM SQL and MS Access
jwalker's Avatar
Novice Talker

Posts: 4
Name: Jesse
Trades: 0
I know alittle SQL(Select, Insert, Delete, and Update statements). I was wondering if there is a way using a JDBC connectiong to run SQL statements to create or open a MS Access report and using a ResultSet from another SQL statement insert the values into the report and print it and then close the report after printing?
Thanks,
Jesse
jwalker is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-01-2007, 03:50 PM Re: SQL and MS Access
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
Trades: 0
No ... you can probably do what you want, but not the way you describe it.

Access has a featured called "linked tables," which you want to get real comfortable with. Basically, even in a mdb file ( where the data lives in Access ) you can store individual pointers to other data sources with all the info the db engine needs to read/write data from them.

You can use ODBC here, so I'm assuming JDBC is an option, although I haven't tried it. Every time you open a "linked" table ( that includes any kind of query ) Access will open a connection to the data store, and get you a refreshed copy of the data.

So ... the answer is to create a linked table ( or several ) in MS Access, then design the report against your linked tables, or a SQL query that involves them. This way you don't have to do any ADO/RecordSet programming, don't have to write any insert statements, or really do much of anything out of the ordinary. Just build the table links, then use a normal select query in your report.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Reply     « Reply to SQL and MS Access
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.10407 seconds with 12 queries