Results 1 to 2 of 2

Thread: execute command line

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2013

    execute command line


    I want to execute command line from VS 2010. How can i do that?

    this my command line to execute :

    cd c:\xampp\mysql\bin
    c:\xampp\mysql\bin> mysql -u root

    mysql> use database_name;

    mysql> source c:\file.sql;

    Thank u very much for ur help

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002

    Re: execute command line

    well, you can use Process.Start to start the mysql console... but after that... it becomes a bit trickier ... your best bet would be to put everything into a .sql file (which it looks like you already have) and then pass that to the mysql commandline, so that it runs the commands automatically.
    See if this helps.

    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width