|
Try this code for xpath query
//Unit[concat(productCode,":",serialNumber)]
Put your xml file and the code where you assign value to XPathString, So that someone could help you.
|
|
|
|
|
Thanks for the reply
This still says 'invalid token'.
Also... The result of 'concat(productCode,":"serialNumber)' is what I want returned, for example, I want the result of my xpath query to be a list of records like:
PCP4:123
macIntel:321
PDAIPAQ:456
The 'concat' function is the part I think is the bit that's wrong... for some reason I think it's not in the MS VS2005 XPath library... could this be possible?
|
|
|
|
|
i am using DtaeTime variable in my codes and adding
some days to it but getting error
"Ticks must be between DateTime.MaxValue.Ticks and DateTime.MinValue.Ticks"
any one can help out
rahul
-- modified at 4:36 Tuesday 20th June, 2006
|
|
|
|
|
What is the code your are using?
|
|
|
|
|
The first point I'd give you is to read Chris' post at the top of the forum on 'How to get your questions answered'. This is a horrible question.
As to an answer, the DateTime object exposes various Add() functions. Your use of it is being interpretted as passing an add of Ticks to the date. (Probably the worst kind of increment anyone could do to a DateTime object)
So your problem is exactly what your error message says: you are passing either too small or too large a number of Ticks. (DUH)
You have asked for help but you never mention just what the
H-E-double-hocky-sticks you are actually trying to do!!!!! For that reason alone I've rated your question as 1 because your question is so stupid.
So if you want to add a certain number of hours or days to a date, then what you would do is : date.Add(new DateTime(0, 12, 0)) In this example you are adding 12 hours to the day in your variable. But, of course, if you just pay attention to your Intellisense, then you would discover that it actually TELLS YOU what to do.
|
|
|
|
|
thanks for ur reply & advice
this much i have understood that this error is coming becouse
some where the datetime objects minimum range i.e 01/01/0001 or maximum
range i.e 31/12/9999 is crossed,but i want to confirm only one thing
that can this type of error happens due to any other reason or this is
the only possible cause.
rahul
|
|
|
|
|
The best way to determine the cause of the error is to debug your code and see what the values are -- the current DateTime value and the value you are trying to add to it. If you are running VS 2005, the debug exception also has a link providing more detailed information on the web.
|
|
|
|
|
Hi
I am using an OpenFileDialog to select a number of files and I change their filenames programmatically by using the FileInfo MoveTo() method. Is there a way of getting the date that the file was last modified as well. I would like to change the filename as in the following example:
Old name = StaffList.doc
New name = StaffList060612.doc
where 060612 is the date that it was modified.
Kobus
|
|
|
|
|
I think FileInfo.LastAccessTime[^] is what you're looking for.
"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
|
|
|
|
|
Perfect, exactly what I was looking for.
Thank you.
Kobus
|
|
|
|
|
I created a form that uses Enterprise Library - DAAB - version Jan 2006 to access the DB in its constructor. Everything works fine; however, when I created a UserControl that attempts to access that form, the VS 2005 designer will not let me drag that UserControl onto a new form. It gives me the following error:
“Failed to create component ‘UserControl’. The error message follows: ‘System.NullReferenceException: Object reference not set to an instance of object. At Microsoft.Practices.EnterpriseLibrary.Data.DatabaseConfigurationView.get_DefaultName(), at Microsoft.Practices.EnterpriseLibrary.Data.DatabaseMapper.MapName(String name, IConfigurationSource configSource)……."
Everything compiles and runs successfully without errors; however, I am unable to use the UserControl on any forms. After debugging, I found that the error is caused by the line “Database db = DatabaseFactory.CreateDatabase();” called by the form that the UserControl contains.
I feel that being able to store forms (w/ DB access) inside UserControls is a reasonable requirement. Any help would be appreciated! Thanks in advance!
Below is the relevant code:
public partial class SampleControl : UserControl
{
private ProductForm subForm = new ProductForm();
public SampleControl ()
{
InitializeComponent();
}
}
public partial class ProductForm : Form
{
public ProductForm()
{
InitializeComponent();
AccessDB();
}
private void AccessDB()
{
//THIS LINE CAUSES THE DESIGNER ERROR
Database db = DatabaseFactory.CreateDatabase();
}
}
thanks
|
|
|
|
|
Hi
i want to check data enterd in controls and then focus on wrong filled control, How should i define (Object or Control) ?
<br />
Control myCon;<br />
<br />
if (textBox1.Text == "")<br />
{<br />
myCon = textBox1 ;<br />
}<br />
else if (comboBox1.ListIndex == -1)<br />
{<br />
myCon = comboBox1 ;<br />
}<br />
<br />
myCon.Focus() ;<br />
I know this code is wrong, but how can i solve it ?
Thank you
|
|
|
|
|
freshonlineMax wrote: How should i define (Object or Control) ?
Modify your code like this;
Control myCon = new Control();<br />
if (textBox1.Text == "")<br />
myCon = textBox1;<br />
if(myCon!=null)<br />
myCon.Focus();
Regards,
_____________________________
Success is not something to wait for, its something to work for.
|
|
|
|
|
Hi All,
Does anybody have ideas, how to find Non-Persistent properties in class in C#? (Any attributes available to decorate Class?)
Thanks in Advance
kumar
|
|
|
|
|
Another stupid question from India. How do you idiots steal so many American jobs???
[Serializable(false)]
|
|
|
|
|
Hi,
I am new to c# , can any one help me create a user dockable (moveable)
window inside a form.
Thank you,
Regards
Praveen
|
|
|
|
|
Hi,
i am a beginer so I don't know how to apply css file in my project. is any one help me?
Regards,
Jack
ok
|
|
|
|
|
What do you mean by "apply css file in my project"
"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
|
|
|
|
|
Sir/Madam
I want to insrert and update a value of textbox. it it is not in the database then display blank. else then show that value and if i click a button named save then it will insert value if it is blank else update that value. the value of that textbox is related to another combobox. and they have one common field soilid.
Sir/madam
if this discription is less then ask me for detailed i will send you that. and i hope that it is sufficient and hope that my problem is solved very qickly.
Thanks for your support
Balwan
|
|
|
|
|
It's not that your question is not detailed enough - it is that it is too broad a question to easily answer in one post.
You are asking about generic database connectivity, which can be found for looking at the ADO.NET documentation, or any number of articles written about database access.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
hello
Could you please tell me how to delete entries in HKLM of windows registry(regedit) in inno scripting lang.
Yogesh_T
|
|
|
|
|
Hi,
In the web application(C#) that i am developing, I use a javascript prompt window.
I need to get the value that is entered in the prompt window to a label control in the C# web form.
I could get the value into a text box using javascript code as:
document.getelementbyid('textbox1').value=-----
but if I try to get the value from the textbox to the label control(or from a hidden field), I am getting the value only after its posted back.Any solution for this?
Thanks,
-- modified at 4:04 Tuesday 20th June, 2006
|
|
|
|
|
Hi
I am using Visual Studio 2003 to develop C# applications. Is there an easy way to prgrammatically change the name of a saved file, eg a word document name?
Kobus
|
|
|
|
|
File.Move[^]
"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
|
|
|
|
|