Forums Register Login

ODBC Connection through a batch file

+Pie Number of slices to send: Send
I just have a question with know wheather or not you can get your java program to run a batch file that will hook up an Access or SQL server database in your program

For Example

run file setup.bat

So basically I want the ODBC connection to be established through the running of a method on the program so if a user is taking my app he can just click it open on for the first time on his comp, then the connection is just their assuming hes running Access or SQL Server

Any help would be greatly appriciated and if you need me to restate the problem please ask
+Pie Number of slices to send: Send
Chase,
I'm not sure if I understand the question, so if this doesn't answer it let me know.

Are you trying to run a batch file from java? If so, use Runtime.exec().
Are you trying to run java from a batch file? If so, use the java command.
Are you trying to share objects between the batch file and java? If so, this can't be done.
+Pie Number of slices to send: Send
I'm trying to run a batch file from a method in java? so would the Runtime.exec().work???
+Pie Number of slices to send: Send
 

Originally posted by Chase Becicka:
I'm trying to run a batch file from a method in java? so would the Runtime.exec().work???


Yes. Runtime.exec() runs an operating system command. In this case, the operating system command is the batch file name.
Tick check! Okay, I guess that was just an itch. Oh wait! Just a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 3166 times.
Similar Threads
Applet not accessing database while running through browser
jdbc:odbc password definition
Plz give the solution for this code......
Problem in output
MS Access 97 / 2000
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 08:58:00.