Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > Running Script File
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 2nd July 02:22
bsien
External User
 
Posts: 1
Default Running Script File



I'm running mySQL at windows XP and trying to include
couple of queries in a script file. The script file is
stored as "C:\myQuery.txt" and it is able to be
invoked successfully in a common way at mysql prompt.

mysql> \. C:\myQuery.txt

My question is, can I invoke the script file not from
the mysql prompt but through a client application


Thanks!

=====

Rgds,
BSien


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=mysql-win32@freebsd.csie.nctu.edu.tw
  Reply With Quote


  sponsored links


2 2nd July 02:22
paul
External User
 
Posts: 1
Default Running Script File



SOURCE and its synonym \. are mysql commands, not SQL
statements. As such, they are implemented internally
by the mysql client programs. To achieve this same
functionality in your application, you'll have to
open the file and process its contents yourself.


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, http://www.mysql.com

Are you MySQL certified? http://www.mysql.com/certification/


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=mysql-win32@freebsd.csie.nctu.edu.tw
  Reply With Quote
3 2nd July 02:22
mack_kn
External User
 
Posts: 1
Default Running Script File


Hi

Yes, you can.
First get MyODBC from the MySQL-website.
Install it ;-)
Create a ODBC DSN for the database to use.
Then use ADO in VB to create a connection via this ODBC DSN.
Now you can read the text file and split it on semicolons.
Send the parts without the semicolons with ADO to the db.
Close the connection.

That's it.

Bye
Christian


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=mysql-win32@freebsd.csie.nctu.edu.tw
  Reply With Quote
4 2nd July 02:22
External User
 
Posts: 1
Default Running Script File


Oops! I though SOURCE was another table.

-----Original Message-----
From: Paul DuBois [mailtoaul@mysql.com]
Sent: Thursday, 16 October 2003 1:25 AM
To: Ooi Bee Sien; win32@lists.mysql.com
Subject: Re: Running Script File


SOURCE and its synonym \. are mysql commands, not SQL
statements. As such, they are implemented internally
by the mysql client programs. To achieve this same
functionality in your application, you'll have to
open the file and process its contents yourself.


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, http://www.mysql.com

Are you MySQL certified? http://www.mysql.com/certification/


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=mysql-win32@freebsd.csie.nctu.edu.tw
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666