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

Posts: 4
Name: Jesse
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
 
When You Register, These Ads Go Away!
     
Old 05-01-2007, 02:50 PM Re: SQL and MS Access
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,024
Name: Forrest Croce
Location: Seattle, WA
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.
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Reply     « Reply to SQL and MS Access
 

Thread Tools

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

vB 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.11683 seconds with 13 queries