Current Position:Home > Batch File & MySQL

Batch File & MySQL

Update:11-30Source: network consolidation
Advertisement
I am using CFExecute to launch a batch file to interact with
another application via the command line. Within the batchfile I
would like perform some logic and one set is to Update a record in
MySQL database. Basically what I want to do is something like this
but I know this is the right syntax.
C:\Program Files\MySQL\MySQL Server 5.0\bin\MySQL.exe" -u
root -p123456
USE: MyDataBase;
UPDATE candidatejobboard SET SubmissionStatus=3 WHERE
JobBoardSubmissionID=39;

The Best Answer

Advertisement
Somewhere in there you need a connect string. I don't know
how to do it with windows/MySql, but I'll show you how to do it
with unix/redbrick. It might illuminate a light bulb over someone's
head.
echo "
your sql goes here
" | risql -d database_name user_name password 2>
file_of_your_choice
in that example, risql is the program that connects to the
db.
  • Batch File & MySQL Update:11-30

    I am using CFExecute to launch a batch file to interact with another application via the command line. Within the batchfile I would like perform some logic and one set is to Update a record in MySQL database. Basically what I want to do is something

  • MySQLDump and Batch Files Update:11-30

    Hello all, I've been using the mysql connector package to populate and retrieve data from a mysql database. Two questions. First, I have recently become very fond of the mysqldump feature attached with the mysql package. Is there a way to call somthi

  • Incorporating .jar files into Batch files Update:11-30

    Hello, I've created an application that requires .jar files to operate correctly. I was able to get them into eclipse, which made me happy. I was able to figure out how to get them into a .html file when I went to put it on the web which made me even

  • Batch file couldn't executes by SQL server agent Update:11-30

    I had a batch file which have pscp command and plink command. If i executes the job it goes into infinite loop and executing forever. I tried many things and checked many forums. All forums says we need to create proxy account in SQL server then only

  • Problem on using batch file Update:11-30

    Hi, I have an application which reads data from a text and writes them to a database. I should use batch files in my project to work classes with double clicking on them. Java application reads path of the text file from a properties file. I used rel

  • Running a java program via a batch file Update:10-11

    I am unable to run a java program from a batch file that I created. spiderpackage.EntryPoint is a class file which I am trying to run with a -v option to output something.What should I do to get the output? echo ^<html^>^<body^> echo hello^<

  • Guide to External Jobs on 10g with dbms_scheduler e.g. scripts,batch files Update:10-11

    GUIDE TO RUNNING EXTERNAL JOBS ON 10g WITH DBMS_SCHEDULER NOTE: Users using 11g should use the new method of specifying a credential which eliminates many of the issues mentioned in this note. This guide covers several common questions and problems e

  • PL/SQL w/ Java to run OS batch file crashes Oracle Update:10-11

    I followed instructions from "Ask Tom" on using PL/SQL with Java to execute an OS batch file. For testing purposes, my batch file does nothing more than display the date and time from the OS. However, when I run the PL/SQL that executes this sim

  • Executing batch file from Java stored procedure hang Update:10-11

    Dears, I'm using the following code to execute batch file from Java Stored procedure, which is working fine from Java IDE JDeveloper 10.1.3.4. public static String runFile(String drive) String result = ""; String content = "echo off\n"

  • How to edit a line in a file using a batch file?????? Update:10-11

    Basically i want to edit one line in a properties file, using a batch file, Here is what it says #Minecraft server properties #Tue Feb 22 15:58:36 PST 2011 level-name=world2 hellworld=false spawn-monsters=true online-mode=false spawn-animals=true max