|
Wow, talk about a topic that takes up complete books...;)
XML - eXtensible Markup Language is primarily a way to "markup" or present a TEXT file as data. It is important that you realize that at its core it is nothing but a text file, and therefore easily passes through firewalls. It is a VERY easy way to get DATA from one place to another, and is especially nice since it doesn't care anything about the platform it ends up on.
XSL - eXtensible Stylesheet Language for Transformation (you may also see it as XSLT) is a way to manipulate the XML files. For instance you might want to present the data in a different sequence, or Transform some of the XML nodes
<name>John Smith</name> can become
<name>
<firstname>John</firstname>
<lastname>Smith</lastname>
</name>
Also, XSL files, are themselves XML files.
That is a VERY high level explanation.
As for your code lines, ds.ReadXml()reads an XML file, the ds.ReadXmlSchema() is for reading a Schema file or an XSD file that defines the structure of the XML data you will be reading.
HTH
WhiteWizard (aka Gandalf)
-- modified at 10:10 Tuesday 30th May, 2006
|
|
|
|
|
XML stands for Extensible Markup Lauguage. This language is used to create your own markup langauge like HTML. In other words xml is used to structure a document. A structured document can be easily written to or read from some persistent storage or to exchange to or from some remote location.
< br />
Schema is used to define rules for a document validity. If you want your xml document user how use its elements you create a DTD or SCHEMA for this purpose.
< br />
XSL stands for extensible stylesheet language. An xsl file provides information to a web browser or some other application how to interpret the xml document. This is just like CSS that instructs web browser how to interpret your document.
< br />
ReadXml() reads data from an xml file.
< br />
ReadXmlSchema() reads schema information from an xml file.
< br />Both xml and schema files have .xml extension.
Abdul Rahman [Peshawar]
|
|
|
|
|
So from all this, What stores Data ( this is all very confusing [ english is not my main language ] ) and what commands\Things do I need to do\use?
XSL\XML, ReadXml or ReadXmlSchema, WriteXml or WriteXmlSchema, what do I need to do for Data?
and if can any-one help me also about the topic I wrote down a few msgs (Unique ID) will help me so much more...
-- modified at 10:29 Tuesday 30th May, 2006
|
|
|
|
|
|
I am trying to implement standard multi-select of rows in a datagrid. That is, allow the user to use the CTRL & SHIFT keys to select multiple rows in a datagrid. Then I'll loop through them and process the selected rows.
The problem is that the KEY events don't seem to be firing on the datagrid. When I just click on a column of the datagrid, and then press a key, the events fire. However, when I use the above keys and select some rows, the KeyUp event does NOT fire. I've tried the KeyPress event as well, and it does not fire either. The mouse events fire, but not the Key events. Does anyone know if this is a bug, or feature?
By the way I've tried this in both VS2003 and VS2005.
|
|
|
|
|
Hi,
I am developing an AddIn which is handling Cut,Copy,Paste commands of IDE(VS.Net 2003).
Although AddIn works fine but if I keep on pressing Ctrl +v it silently dissociates itself from IDE and IDE starts handling all trapped commands.
As per my understanding when cursor crosses a particular limit while pasting data and after that if there is a new Ctrl + V, AddIn stops without calling OnDiscoonection().
Kindly help me .
Ruhina
|
|
|
|
|
what is wrong with the query below ?
OleDbDataAdapter adp10 = new OleDbDataAdapter("Select case,dailycase From caseinfo where case>='" + txtcasestart.Text + "', case<='" + txtcasefinish.Text + "' and startdate >='" + txtstartdate.Text + "' and enddate <='" + txtenddate.Text + "'", conn);
it gives comma error ?
and one more question ? do i have to convert to txtstartdate and txtenddate to datetime to compare date values ?
thanks in advance,
bye.
|
|
|
|
|
hmmm... First of all I should say "next time try the SQL\ADO\ADO.NET forum", they know SQL queries better...
Butttt... I can help here (I think).
Second of all, If it's a DateTimePicker it's not Text, it's Value (Properties).
Third of all, in SQL queries ' does NOT stand for DATE!!! # <- this stand for Date! try switching them in the right places. this should work now.
And 4th of all, the # will convert them, don't forget to put in the start AND in the end... i.e: and startdate >='" + txtstartdate.Text + "' -> and startdate >= #" + txtstartdate.Text + "#
Good Luck...
NaNg
|
|
|
|
|
NaNg15241 wrote: Third of all, in SQL queries ' does NOT stand for DATE!!!
Yes, it does. Exclamation mark. The SQL standard uses apostrophes around dates. Exclamation mark. Exclamation mark. Exclamation mark. Exclamation mark. Exclamation mark. Exclamation mark.
The exception is the Access database, that uses the # character instead.
NaNg15241 wrote: And 4th of all, the # will convert them, don't forget to put in the start AND in the end... i.e: and startdate >='" + txtstartdate.Text + "' -> and startdate >= #" + txtstartdate.Text + "#
Do you really expect anyone who doesn't already know what the problem is to understand that?
---
b { font-weight: normal; }
|
|
|
|
|
Not sure, but I think the problem is at the beginning of your where clause:
where case>='" + txtcasestart.Text + "' AND case<='" + txtcasefinish.Text
Anyway, I think you should also take a look at this article: SQL Injection Attacks and Some Tips on How to Prevent Them[^]
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
www.troschuetz.de
|
|
|
|
|
OleDbDataAdapter adp10 = new OleDbDataAdapter("Select case,dailycase From caseinfo where case>='" + txtcasestart.Text + "', and case<='" + txtcasefinish.Text + "' and startdate >='" + txtstartdate.Text + "' and enddate <='" + txtenddate.Text + "'", conn);
|
|
|
|
|
Hi all,
Sorry Code project. I'm posting yet another question. I just cant get past this problem...
I'm trying to get this command executed in cmd through C#.
The command needs to be in Quotation marks like this when it gets sent to cmd...
"c:\Program files\progressive projects\progress\reporttemplates\fop.bat" -xml "c:\program files\progressive projects\progress\reporttemplates\ClientRecordCard.xml" -xsl "c:\Program files\progressive projects\progress\reporttemplates\ClientRecordCardHairFo-pdf.xsl" -pdf "c:\Reports\ClientRecordCard.pdf"
my code looks like this
The TempPath And TempName
TempPath = c:\program files\progressive projects\progress\reporttemplates
TempName = ClientRecordCardHairFo-Pdf
startInfo.Arguments = "/C " + "\"" + @Convert.ToString(TempPath) + "\\fop.bat" + "\"" + " -xml" + "\"" + @Convert.ToString(TempPath) + "\\ClientRecordCard.xml" + "\"" + " -xsl" + "\"" + @Convert.ToString(TempPath) + "\\" + @Convert.ToString(TempName) + ".xsl" + "\"" + " -pdf" + "\"" + @Convert.ToString(Salon.Library.GlobalVariables.Reports_Path) + "\\ClientRecordCard.pdf" + "\"";
my logic tells me that it should work but i get an error saying "'c:\Program' not recognized as an internal or external command, operable program or batch file.
He who laughs last...
|
|
|
|
|
it is as if the Quotes aren't in the right place in my code...
not opening and closing on the right places if you understand what i mean.
He who laughs last...
|
|
|
|
|
You are corecct!!! (Ding Ding Ding Ding Ding!!!) I fixed your qouts in my post here.
|
|
|
|
|
well as I see you don't leave spaces and don't put everything in it's place... (and there are alot of things that could be shorten...)
try this:
startInfo.Arguments = "\"" + @Convert.ToString(TempPath) + "\\fop.bat\" -xml \"" + @Convert.ToString(TempPath) + "\\ClientRecordCard.xml\" -xsl \"" + @Convert.ToString(TempPath) + "\\" + @Convert.ToString(TempName) + ".xsl\" -pdf \"" + @Convert.ToString(Salon.Library.GlobalVariables.Reports_Path) + "\\ClientRecordCard.pdf\"";
this SHOULD work, but I don't promis you cuz I don't realy know what you after here.
NaNg.
|
|
|
|
|
thank you, ill give it a go.
He who laughs last...
|
|
|
|
|
|
hi,
sorry, it didn't work
public void shellControl2()
{
if(CustCd != "")
{
ProcessStartInfo startInfo = new ProcessStartInfo("cmd.exe");
// /c switch sends a command
startInfo.Arguments = "/C " + "\"" + @Convert.ToString(TempPath) + "\\fop.bat\" -xml \"" + @Convert.ToString(TempPath) + "\\ClientRecordCard.xml\" -xsl \"" + @Convert.ToString(TempPath) + "\\" + @Convert.ToString(TempName) + ".xsl\" -pdf \"" + @Convert.ToString(Salon.Library.GlobalVariables.Reports_Path) + "\\ClientRecordCard.pdf\"";
// redirect messages to this program
startInfo.RedirectStandardError = true;
startInfo.RedirectStandardOutput = true;
//don't execute using shellexecute API
startInfo.UseShellExecute = false;
//Don't open command prompt window
startInfo.CreateNoWindow = true;
System.Diagnostics.Process p = System.Diagnostics.Process.Start(startInfo);
string output = p.StandardOutput.ReadToEnd();
string error = p.StandardError.ReadToEnd();
p.WaitForExit();
if (output.Length != 0)
{MessageBox.Show(Convert.ToString(output));
shellControl1.WriteText(output);}
else if (error.Length != 0)
{MessageBox.Show(Convert.ToString(error));
shellControl1.WriteText(error);}
}
}
This is the code snippit i'm using to send a command to command prompt to run the fop batch file to create a pdf file from xml and xsl files. if you can help it would be great. i had it working fine when all the files were in "C:\Reports\" But we had to move it to the derectory where the user installs the program and only the pdf file(Result) would be stored in the "C:\Reports\" directory.
He who laughs last...
-- modified at 9:09 Tuesday 30th May, 2006
|
|
|
|
|
Is this the code? you didn't change anything in here except putting all I've written to you in a variable that probably shows you a warning "command is never used"...
put it in the Argument, it is still the last one that doesn't work.
|
|
|
|
|
the argument is your code. the command variable was my code but i've taken it out
it gives the same error: "'C:\Program' is not recognized as an internal or external command, operable program or batch file."
He who laughs last...
|
|
|
|
|
May I ask what is the /C?
|
|
|
|
|
the /c is the command line switch that lets command prompt know to run the command. That is how i understand it.
He who laughs last...
|
|
|
|
|
Well maybe try without it?
Maybe it's \c and not /c?
Check some stuff out...
Are you sure it's with a space after it? try also that.
-- modified at 9:24 Tuesday 30th May, 2006
|
|
|
|
|
thanks for your time and thanks for trying.
Enjoy your day
He who laughs last...
|
|
|
|
|
No problems... but does it work or not?
|
|
|
|