What I want to know is how to run code which I have put in a text file, in the MySQL command line client, using the SOURCE command.
(The text file I put the code in is called 'Testrun').
I know it starts by:
SOURCE C:\Users\Emily\Documents\MySQLpractice
but I don't know how to finish the command. I understand you have to put the file name afterwards, but is there a backslash, a forward slash or something else in-between that and the file path?
What's in the text file:
USE exams;
SELECT * FROM students;
I have tried to look up the answer before but people said different things each time, and I couldn't get anything to work.
Help is hugely appreciated.
The proper syntax on windows is:
SOURCE C:/Users/Emily/Documents/MySQLpractice/File.sql;
Related
I am searching for a way for testing my webpage using the command line.
My intentions are
check an anchor tag is present on the page
check the anchor tag href is pointing to the correct(pre-defined) web link
Check the anchor tag text is the pre-defined one
I should be able to check other tags also like img, script, etc.
After searching, I came across htmlUnit.jar. But I am not getting any proper link on how to run this in the command line.
Will I be able to pass the test cases to the jar file? If so, please guide me
What is the syntax to run this htmlUnit.jar file in the terminal? I am unable to find any useful documentation
Please help if I can achieve my goal by this file
HtmlUnit is a library, you have to write your own program using HtmlUnit for your use case.
Another option is to use Wetator (www.wetator.org).
Wetator is
based on HtmlUnit
runs from the command line
can perform the different asserts you like to do
generates a nice report (and also a return code if at least one assert fails)
(Ok, i'm the person behind HtmlUnit and Wetator so maybe i miss some other option)
My goal is to copy a XML file from one project to another project in my solution after a succesful build.
copy $(SolutionDir)Xenos.Core.API\XmlDocumentXenosCoreApi.xml $(ProjectDir)App_Data\XmlDocumentXenosCoreApi.xml
This would translate in this.
copy D:\XENOSTFS2015\Sprint Development\Diversification Sprints\Xenos Main\Xenos.Core.API\XmlDocumentXenosCoreApi.xml D:\XenosTFS2015\Sprint Development\Diversification Sprints\Suite\XenosWebAPI\App_Data\XmlDocumentXenosCoreApi.xml
But I want the first argument of copy to be like this, so the solutiondir should go two levels up. A
D:\XENOSTFS2015\Sprint Development\Diversification Sprints\Suite\XenosCoreApi\XmlDocumentXenosCoreApi.xml
Also I'm worried that the spaces will prevent the copy from executing, how can I solve this?
Thx in advance !!
I have a simple question. When I create a CommaIO, it works but when I arrive to the 'if' statement, it doesn't go to inside the 'if'. The message 'blabla' is never printed. Nevertheless, the file name is correct and the path also. My csv files was saved in Excel with csv(comma delimited) extension. The file and directory are authorized in read mode
commaIO = new CommaIO(#"C:\\Users\\lbagno\\Documents\\SalesPrice.csv","r");
print "blabla";
pause;
print "fdf";
pause;
if(commaIO)
{
print "ici3";
pause;
}
Where is the problem ?
Thank you
When I first saw this I thought it was because you had \\ aswell as the # but seemingly in my code it works when I put it in a job.
Few questions.
try removing the \\ so it is just \ and see whether that fixes it (as I said it doesnt make a difference on mine)
Does the user running AX have access to that file path?
Does the file exist.
A few pointers for you, try using info("string") instead of print and pause, it's more standard and you dont have to pause every step.
Also commaIO has been superceeded by CommaTextIo. Looks like you can use the same code but I'm guessing it adds some functionality. http://msdn.microsoft.com/en-us/library/aa624902(v=ax.50).aspx
I can't comment on this post because of I don't have a high enough reputation so sorry if this isn't helpful as an answer.
Try moving the file to C:\Temp directory. It may be a permissions issue!!
The # makes it a string literal...so you're doing double \\ for no reason...but I think it still does work.
Use one of the two though:
CommaIo commaIO = new CommaIO(#"C:\Users\lbagno\Documents\SalesPrice.csv","r");
CommaIo commaIO = new CommaIO("C:\\Users\\lbagno\\Documents\\SalesPrice.csv","r");
Also, checking if (commaIo) will work if it finds a valid file, then you run while (commaIo.status() == IO_Status::Ok).
I'd say the issue is that either your file does not exist (as typed), it's a client/server issue, OR it's a permissions issue.
Start with a job and a local file.
I am a beginner attempting to learn SQL with Zed Shaw's "How to Learn SQL the Hard Way"
In excercise 0: The Set up, he states:
Then, look to see that the test.db file is there. If that works then you're all set.
But when I run the command,
sqlite> create table test (id);
sqlite> .quit
the execution runs, but it doesn't create a test.db file. I looked in the same folder as where the sqlite3.exe file is and I see nothing.
I attempt to see if I can continue without this step, then - In his next exercise, "Excercise 1: Creating Tables":
I input his commands, but when attempting to run sqlite3 ex1.db < ex1.sql, it gives me an error.
I even tried putting the create table command and saving it as a '.sql' file into the same folder as sqlite3.exe.
How can I set this environment up properly? Can someone explain this on an "easy to grasp" level? Any response is appreciated**
Edit 1
I'm not exactly sure how Zed Shaw how he wants his learners to use SQLite 3, Maybe I can go into some research but I just don't understand why he leaves such a large gap of assumption that everyone knows what to do for the set up process...
I had this exact problem. I am using windows 7.
From this website: http://www.sqlite.org/download.html
I used the:
"sqlite-tools-win32-x86-3130000.zip
(1.51 MiB) A bundle of command-line tools for managing SQLite..."
under the "Precompiled Binaries for Windows" heading.
My helper directed me to open the file named "sqlite3" after I'd extracted the files from the zip file. It brought up a black window, in the command line style, showing some text, and then the familiar sqlite> prompt.
Then he had me input:" .save data_base_name.db " (I chose to have my database be named 'thedatabase'.)
which created a file in the same folder as the sqlite3 file, called "data_base_name" as a "Data Base File".
That's where I'm at so far, I'll post updates as I have them.
Anyone know where the documentation is for the properites file?
I am trying the following exportQuery:
select * form ci_infoobjects where si_kind like 'FavoritesFolder' and si_name like 't%'
It is correctly grabbing the users but, is not biaring any of the folders/reports that said user has.
Suggestions?
Ok here is what I have found out.
documentation: on the command line importe is in the bi_vip pdf provided by SAP (which I will provide a link to later).
usage: My query isn't exactly correct but, removing the si_name portion should get you th right result.
issues: It seems that the command line importer does not gracefully handler export errors. Any export error it receives the command line will kill itself.
work around: I am pretty much duplicating the ImportWizard in java at this using API BIAROutput and IException.
I will hopefully post back my source code for the command line import tool in java.