Executing Microsoft access macros using java
Hi Everyone,
I hava an application in microsoft access,in which many macros which extract data are there.I want to know is there anyway that I can execute the macro written in microsoft access using java.
Can anyone please answer the above.
Regards,
Rakesh.
rakbha wrote:
I hava an application in microsoft access,in which many macros which extract data are there.I want to know is there anyway that I can execute the macro written in microsoft access using java.
I am rather certain that that is not possible via the ODBC driver and thus not possible via JDBC.
There is certainly an OS API that will allow that but accessing those is not a standard part of the Java API so it would require a JNI solution (yours or someone else's) or an application that allows that access.
Similar Messages
-
Can Java executes Microsoft Access Macro?
Is there any way to run a Macro of Access database from Java? How to
do it if so?
I searched the internet, I have not found an answer yet. It seems
there is no way. true or false?
We have a lot of statistic charts generated by Macros of either Access
database or Excel and want to put on the web so that user can view the
charts by a click from anywhere. Our web applications are developed
in JSP and on Tomcat.
Any suggestions are appreciated.
Thanks**MAJOR SPAMMING SCUM BAG ALERT**
I was puzzled in that you asked a SQL Server question in one post and then in another thread asked a Oracle related question... and then I noticed you had cross posted one of your questions at JavaRanch and I was more annoyed....
and then I found this....
http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=10&t=002447
You sir -> Michael Byrd -> are scum sucking dirtbag.
To quickly explain. Mr. Byrd posts his messages (which he copies wholesale from other posters) so that he can get better google caching for the website listed in his profile.
This is such scummy behaviour I don't even know what to say. Other than basically everyone that has ever helped you had totally wasted their time.
You are scum. Your company is scum. I hope you rot in hell. -
Getting error: E_ADEPT_DISTRIBUTOR_AUTH while access ACS4 using java
Hello Everyone,
Thanks for ur time. I am new to ACS4.
I am trying to access ACS4 using java code and view the response for ALL ITEMS.
Below is the code that i created using UploadTest reference.
String targetURL_viewAllItems = "http://xxx.xxxxxxx.com:8080/admin/ManageResourceItem";
String nonce = Base64.encodeBytes(makeNonce());
byte[] hmacKeyBytesSHA1 = TestXMLUtils.SHA1(PASSWORD);
String hmacKey = TestXMLUtils.hmac(hmacKeyBytesSHA1);
String output_viewAllItems = "<request action='get' auth='builtin' xmlns='http://ns.adobe.com/adept'><nonce>"+nonce+"</nonce><expiration>2011-08-17T09:43:34-00:00</expiration><hmac>"+hmacKe y+"</hmac></request>";
System.out.println(output_viewAllItems);
sendContent(output_viewAllItems, createConnection(targetURL_viewAllItems));
But after executing this code from my desktop, i am getting the below error response:
<error xmlns="http://ns.adobe.com/adept" data="E_ADEPT_DISTRIBUTOR_AUTH http://xxx.xxxxxxx.com:8080/admin/ManageResourceItem urn:uuid:00000000-0000-0000-0000-000000000001"/>
Please help me to figure out the error.
Thanks
Rupal ChatterjeeAre you sure you are signing the URL/.acsm file correctly for those particular books?
-
How do I open a pdf stored in a Microsoft Access database using Visual Basic studios 2012
Currently I am unable to find a valid method of being able to open a pdf stored in a Microsoft Access database using Visual Basic studios 2012. I've tried displaying the entire database on a form, but when I do this all the other columns show up with
the correct data besides the one containing the pdf's, it just displays <binary data> in each row down the column. I also tried another method with which you use the database as a dataset and can drag and drop the rows and columns into the form, which
again works for all the other columns besides the one containing the pdf's but this time I'm unable to interact with the column at all.
Not too sure if this is in the correct place, but any answers or help would be appreciated. Cheers.Alex,
This forum is dedicated to Project and Project Server. You might get better response, if you post to a Visual Basic forum. Here are couple I could find.
https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vbgeneral%2Cvblanguage&filter=alltypes&sort=lastpostdesc
Cheers,
Prasanna Adavi, Project MVP
Blog:
Podcast:
Twitter:
LinkedIn:
-
Setting System DSN for MS Access Database using Java Code
How to set the system DSN for Access database using Java Code at runtime....???
Replies are deeply appreciated...I found a 3rd Party MS Access JDBC Driver from a Google search. I downloaded and tried the free trial version. It worked fine but we opted not to purchase the full version and went a different route. If you don't find it, let me know and I'll see if I can track down the name of the product we tested.
-
Access microsoft word doc using java
how can i access microsoft word using java .
I want to select text from the word in the same format as it is.
if possible can u all help meBy using an appropriate library. JText, whatever.
Google, man.I think Rene meant iText!Whatever. :) Never used it, I just remembered there was something named like that. Thanks. -
Open a Microsoft Access file using LV
Hi,
When my VI finishes executing I would like it to Open up a Microsoft Access file and delete an Excel Table. I have gotten it to delete the Excel Table, however, it will not open the Access file. I have tried using Open File and I have tried open/create/replace, but they are not working. I am almost positive I am putting the directory and file extentsion right as well. I am using LV 6.1.
ThanksI have recently added data-basing using labview and access. I am using labview 7.0 and the DB toolkit. I have no problem connecting to access using the jet 4.0 engine, where I can read modify and edit access data. What are you trying to delete? a table, remove entries or delete the entire file itself. There are two ways to connect to access, using an activeX control or through ODBC. I have never used activeX for access but have used it for excel, this was not too difficult but there is a lot of methods and properties to wade through to get things working. I might be able to help you, but will need a little more info on what you need to do with access. Using the DB toolkit and ODBC, you will not need access on the machine to use the database, which is a nice option if you plan on distributing the application. I am a DB novice but have been learning fast, I think Mike Porter knows alot about labview and database connectivity, hopefuly he will help out here.
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA -
How to execute external spawned process using java
Hi,
I am executing PGP from command line using java.
For adding the public key I use Runtime object like this
Runtime rt = Runtime.getRuntime();
Process process = rt.exec("pgp -ka "+"d:/Mangesh/pubkey/sandy.asc "+"C:/PROGRA~1/NETWOR~1/PGPNT/keyrings/pubring.pkr");PGP is executing this but inbetween it asked for confirmation "Do you want to add public key (y/n)"
I am providing data to process this way:
PrintWriter pw = new PrintWriter(new OutputStreamWriter( process.getOutputStream()));
pw.write('y');
pw.flush();But after this their is no execution from PGP and console remains until I closed it.
PGP is waiting for ENTER KEY
How can I provide ENTER KEY from java
This is right method ??? or any other options are available??
I am awaiting for your valuable suggestions .
Regards
Man479On Windows the "enter key" consists of two characters: carriage return and a line feed (\r\n). You may have to send both. If that doesn't work, pgp is not reading the reply through stdin, only through the console, and there's no way to pass the 'y' to it through Java.
-
Access database using Java from HTML webpage
Hi,
I've got to create some online maths tests to be taken by students with their marks being stored in a database.
I've wrote some simple java code which can add/remove and modify entries in a test mySQL database that I made. What I now need to do is be able to add entries to the database from a html page.
The math tests will be java applets with the students having to interact according to questions, press submit and their score will be output. The score will then be entered into the database.
The problem I'm having is that with an Applet their are all sorts of security issues (I'm having problems getting images to load in an Applet) so assume I'll face the same security issues when I try to access a database through an applet.
So, could someone please help get started.
CheersMVC - I assume you mean model-view-control and not Marvel vs Capcom :)
If so then does this mean I should completely seperate the user interface (the actual applets that will contain the test), the database (that will store the results) and the link between the two?
is it possible to acheive this using Java, Java Applets, Java Script and the database (in my case mySQL) and could you give me some tips on how best to tackle the problem.
Thanks -
Printing a microsoft word doc using Java Print API
Hi,
I have to print a microsoft word doc.I am using Java Print API, but the code is printing only Hashcodes instead of the actual document.
Here is the code. Please let me know whats wrong in it.
CODE:::
public String print() throws Exception {
String realPath = getRealPath("/images/formLibrary/csaAddressContactRequestForm100.doc");
PrintRequestAttributeSet pras1 = new HashPrintRequestAttributeSet();
DocFlavor flavor1 = DocFlavor.INPUT_STREAM.AUTOSENSE;
PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();
DocPrintJob job = defaultService.createPrintJob();
FileInputStream fis1 = new FileInputStream(realPath);
DocAttributeSet das = new HashDocAttributeSet();
Doc doc1 = new SimpleDoc(fis1, flavor1, das);
job.print(doc1, pras1);
Thread.sleep(10000);
System.exit(0);
return "";
}By using an appropriate library. JText, whatever.
Google, man.I think Rene meant iText!Whatever. :) Never used it, I just remembered there was something named like that. Thanks. -
How to retreive a record from access DB using Java?
I have an access DB, I'm trying to get a record from the access DB, I need clue to keep going, please check my code belowpackage PermutPack;
import java.sql.*;
public class BD_Connection {
public static void main(String[] args){
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
// set this to a MS Access DB you have on your machine
String filename = "C:/Dev-Java/Permutation/Lexiteria_US.mdb";
String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";
database+= filename.trim() + ";DriverID=22;READONLY=true}"; // add on to the end
// now we can get the connection from the DriverManager
Connection con = DriverManager.getConnection( database ,"","");
Statement st = con.prepareStatement("SELECT word FROM Lexiteria_BD WHERE ID = 5688");
System.out.println("st: "+st);
/* PreparedStatement pstmt2 = con.prepareStatement(
"SELECT a, b, c FROM Table1", ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);
ResultSet rs = pstmt2.executeQuery();*/
catch (Exception e) {
System.out.println("Error: " + e);
}ronisto wrote:
Good but if I do System.out.println("ps: "+ps); I'm getting "ps: sun.jdbc.odbc.JdbcOdbcPreparedStatement@13c5982"Right, that's the reference value of the Java object. Immaterial.
Does the query work now?
You realize, of course, that you have to call executeQuery() on the PreparedStatement and then get the results out of the ResultSet.
Maybe you need a JDBC tutorial to brush up on the basics. Google for "Sun JDBC tutorial".
% -
Read Excel with macros using Java POI
Hi,
I'm very desperate... I have to do following things: read Excel file with macros. I can read xls without macros, but i haven't ideas what to do, so correctly read records with macros in xls.
I use following method to listen for incoming records and handles them as required.
public void processRecord(Record record)
switch (record.getSid())
// the BOFRecord can represent either the beginning of a sheet or the workbook
case BOFRecord.sid:
BOFRecord bof = (BOFRecord) record;
if (bof.getType() == bof.TYPE_WORKBOOK)
System.out.println("Encountered workbook");
// assigned to the class level member
} else if (bof.getType() == bof.TYPE_WORKSHEET)
System.out.println("Encountered sheet reference");
break;
case BoundSheetRecord.sid:
BoundSheetRecord bsr = (BoundSheetRecord) record;
System.out.println("New sheet named: " + bsr.getSheetname());
break;
case RowRecord.sid:
RowRecord rowrec = (RowRecord) record;
System.out.println("Row found, first column at "
+ rowrec.getFirstCol() + " last column at " + rowrec.getLastCol());
break;
case NumberRecord.sid:
NumberRecord numrec = (NumberRecord) record;
System.out.println("Cell found with value " + numrec.getValue()
+ " at row " + numrec.getRow() + " and column " + numrec.getColumn());
break;
// SSTRecords store a array of unique strings used in Excel.
case SSTRecord.sid:
sstrec = (SSTRecord) record;
for (int k = 0; k < sstrec.getNumUniqueStrings(); k++)
System.out.println("String table value " + k + " = " + sstrec.getString(k));
break;
case LabelSSTRecord.sid:
LabelSSTRecord lrec = (LabelSSTRecord) record;
System.out.println("String cell found with value "
+ sstrec.getString(lrec.getSSTIndex()));
break;
case FormulaRecord.sid:
FormulaRecord fre = (FormulaRecord) record;
System.out.println("Formula: "+ fre.getValue());
break;
I don't know, how check, that incoming record is joined with macro and I don't know how handle it.
Is there possible to create Excel file with macros using POI?
Please help me...
MargaretI want to read the contents of an MS Excel file from
java, is it possible using JavaBeans-ActiveX bridge or
by any other java technologies, if possible, how ?Bridge2Java from IBM Alphaworks will do the trick for you.
You can get it from here:
http://www.alphaworks.ibm.com/aw.nsf/techs/bridge2java
Using it, you can do things like the following (taken and abbreviated from the samples provided with the package):
import Excel.*;
public class QuickExcel
public static void main(java.lang.String[] args) {
Application app;
Workbooks wbs;
Workbook wb;
Worksheet sheet;
Range rangeA1, rangeA2;
try
com.ibm.bridge2java.OleEnvironment.Initialize();
app = new Application(); // Excel.Application !!! :-)
app.set_Visible(true);
wbs = app.get_Workbooks();
wb = wbs.Add();
sheet = new Worksheet(wb.get_ActiveSheet());
rangeA1 = sheet.get_Range("A1");
String out = new String("This is a test");
rangeA1.set_Value(out);
// Wait five seconds
Thread.sleep(5000);
// Close the workbook without saving
wb.Close(new Boolean("false"));
app.Quit();
} catch (com.ibm.bridge2java.ComException e)
System.out.println( "COM Exception:" );
System.out.println( Long.toHexString((e.getHResult())) );
System.out.println( e.getMessage() );
} catch (Exception e)
System.out.println("message: " + e.getMessage());
} finally
app = null;
com.ibm.bridge2java.OleEnvironment.UnInitialize();
} -
Want to access floppy using java program
===> is it possible to access the floppy and format it using java program. (if, it is not possible to format it then plz. tell me how to access the floppy using java program).
if possible plz. send me code of that programs on following address..
[email protected]
waiting for reply.
prasad.
(faculty of ssi)Hi prasad
I did a search for you and here are the results
http://search.java.sun.com/Search/java?qt=%22format+disk%22+%22format+a+disk%22+%22format+a+floppy%22+%22format+the+floppy%22&col=jsun1&col=javafrm&rf=0 -
Help with calling windows executable and hiding it using java
Hi,
I have a small utility which calls sqlplus from java , which basically executes a sql file .
Process sqlProcess = runtime.exec(command);
Where command is string and has all the required parameters.
(sqlplus_exe , username_password_sid , sql-file_to_execute_path)
This works fine but it pops up a sql plus window on screen which kindof the user has control .
Like the user can close that sqlplus window before the script gets executed completely.
I want that window to be hidden so that user doesn't have any control on the window and can't interfere with the sql execution.
So thoght about windows api , ShellExecute where you can provide a parameter to hide the window.
Details are in below
[http://support.microsoft.com/kb/224816]
Now the options I have considered to call ShellExecute are JNI / JNA / Smooth
I am using eclipse hellios on winxp
JNI
I Got the code from some website which has all the required files from here [http://www.heimetli.ch/shellexec.html]
But I am not able to run the code .
It says Exception in thread "main" java.lang.UnsatisfiedLinkError: no HSWShellExec in java.library.path
which I am not able to resolve .
Even I had put the dll and .h file in the JAVA Build Path> Library section.
JNA
looks very simple .But I don't know which library to load and call which funtion :(
JSMOOTH
It always gives jsmooth.Native.isAvailable() as false.
And I dont know how to make it true
And also thinks that it works the other way around i.e. Jsmooth loads the JVM .Don't know if it can be called from within jvm
So there I am stuck .
Any suggestions guys.
Any example code would be great.
Thanks in advance.
Edited by: Rajinder_Sandhu on Jul 14, 2010 7:58 AMI got it working with JNI and the sample code from the website
The whole matter was get the path correctly setup in eclipse.
The solution is posted here.
[http://www.eclipsezone.com/eclipse/forums/t49342.html] -
How to connect with Microsoft Access Database with JAVA
I want to know the command and query to connect between MSAccess and JDBC.
Is it beter way to make connection with MSAccess comparing with other Databases such as SQL and Oracle.
Which Database will be the best with Java?
I also want to know to be platform indepadent which database is suitable?On Windows, you can use MS Access database by:
Set up a System Data Source using the ODBC control panel applet.
Use the jdbc:odbc bridge JDBC driver, and specify a jdbc url that points to the data source name you just specified.
It's been too long since I've done this, so I don't remember the syntax of the jdbc url, but I'm sure that if you do a search for the jdbc:odbc bridge that you will find what you are looking for.
As far as the question about which database is best, you will need to determine that based on your project requirements.
If you want a quick and dirty, open source, cross-platform database, take a look at HyperSonic SQL.
- K
Maybe you are looking for
-
Can i have two completely separate backups with Time Machine
Hi Before i did this i thought it best to ask the question here. Basically i have two huge iTunes libraries. One for official music, the other for unofficial stuff. Both of these libraries have their own separate external hard drives. For one of the
-
Bootcamp and Windows 8. bug
Hello, I have a problem now with Bootcamp on Microsoft Windows 8.1. - My hot keys for backlight access keys do not work. (Cursor blistered) - The Quick Access brightness button works but nothing changes. - Going through Windows menus, you can not adj
-
My Safari opens to apple.com. It goes to apple.com even though I type icloud.com. On some days this happens repeatedly but on other days it goes directly to icloud.
-
Want to check whether input field in selection-screen is numeric or not
i have a select -option in selection-screen in which user enters a value.i just want to check if this value is numeric then it should be 18 positions prefixed with zeroes if numeric like 000000000000400000 and needs to be left justified if not nu
-
[SOLVED] Netbeans won't start unless I am root
Hi problem as topic. I have this issue since I upgraded to 7.3 (I didn't do this earlier, for I have to reconfigure the android plugin each time a new version comes) The symptoms are exactly as discribed in this thread: https://bbs.archlinux.org/view