|
Hi,
I would appreciate if somebody could post some links (or sample code) to transform a ADO resultset to string using XSL.
Thanks.
|
|
|
|
|
Prashant, see listing 2 in the .zip file on this[^] page. You don't need to register/subscribe in order to download the file.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
I have a file that is being written to using stream writer. The file is written in frequent, random intervals. If I were to use a seperate application to grab a copy of this file (using File.Copy), would there be a chance the two applications would collide, while trying to perform operations on the same file? Or is the File.Copy method independant of whether the file is in use.. meaning I'd get the most recent copy from the last stream writer update?
Any help would be appreciated!
|
|
|
|
|
cmarcus wrote: have a file that is being written to using stream writer. The file is written in frequent, random intervals. If I were to use a seperate application to grab a copy of this file (using File.Copy), would there be a chance the two applications would collide, while trying to perform operations on the same file?
Assuming the stream writer has only locked the file for write operations (i.e. read operations are still allowed), then there should be no problem with the other application using File.Copy. It is essentially only reading the file.
cmarcus wrote: Or is the File.Copy method independant of whether the file is in use.. meaning I'd get the most recent copy from the last stream writer update?
It will get the version that was last updated by stream writer as a result of flushing the buffer.
|
|
|
|
|
pleas i want to know how to record a voice from the mic and play it back when i need
some one told me to try NBass i try it and i got these problem
====================
An unhandled exception of type 'System.NullReferenceException' occurred in nbass.dll
Additional information: Object reference not set to an instance of an object.
====================
it dosenot work i don't know why
all i need is code to record and play
simple code
|
|
|
|
|
|
i don't know what information you need
tell me like what ?
|
|
|
|
|
Such as the piece of code that causes the NullReferenceException to be thrown.
|
|
|
|
|
Hi there,
I there a way to set the DateTime to always return things in Univeral Time? looks like its default kind is local... and I can't see any static method to set it to always give me the universal time value. Right now, I have to do a .ToUniversalTime() everytime I try to get the date time value...
Thanks for the help,
~Rafferty
|
|
|
|
|
I'm a little confused on how you're using the DateTime. Finally, in .Net 2.0 they fixed DateTime so it knows whether it's local or universal. If you want to create a new DateTime, there's a constructor that takes the DateTimeKind enum. If you're always pulling the current date, you can use UtcNow.
www.logifusion.com
|
|
|
|
|
ahhh... okay so I really have to change all my code. I was declaring everything without specifying the kind, and somehow when I display it in the screen i'm working on, everything's in local.
a few more questions, i can't find these in the help:
- when you do a DateTime.Parse(...), what's the DateTimeKind set to? Unspecified?
- what happens if you Compare a local and an unspecified DateTime? does it ignore the kinds or does it first convert the unspecified date time to something else?
Thanks!
|
|
|
|
|
Good questions. Unspecified is what it will most likely be when you parse. But you can also use the SpecifyKind method.
<br />
DateTime dt = DateTime.SpecifyKind(DateTime.Parse("some string"), DateTimeKind.Local)<br />
Comparison is a tricky one as well. DateTime has an Int64 buried underneath it that represents the ticks that identify the time. There were two bits left over of the 64 that were not used, so in .Net 2.0 they decided to use them for the DateTimeKind enum. I imagine an equals should check the kind since it will probably just compare the two integers. Compare might do this as well. MSDN just tells you to make sure they're both in the same time zone.
www.logifusion.com
|
|
|
|
|
Out of curiosity, it it capable of being set to an arbitary timezone, or just local/utc?
|
|
|
|
|
Unfortunately not. They only had two bits left over, so they used it to decide if it was local, universal, or unknown. You could use a TimeZone object to convert a DateTime to its local time. But then you just have to obtain a TimeZone object for the time zone you want. When you use TimeZone.ToLocalTime() it will mark it as local. It can be pretty confusing to work in more than one time zone. I usually stick to universal time.
www.logifusion.com
|
|
|
|
|
is TimeZone one of the new .net2.0 classes? Having had to deal with different zones in 1.1 I ended up with a class that only did local and utc since the system made them somewhat bearable, but not being able to do arbitary zones really bugged me.
|
|
|
|
|
It's not a new class. The problem is it's abstract and there isn't an easy way to just grab another time zone.
www.logifusion.com
|
|
|
|
|
Hi everybody,
I tried the following code, but I still need to click on the cell before it is selected. Is there a way to make the a cell the selected...
dataGridView.CurrentCell = dataGridView.Rows[e.RowIndex].Cells[pathIndex];
|
|
|
|
|
An unhandled exception of type 'System.NullReferenceException' occurred in nbass.dll
Additional information: Object reference not set to an instance of an object.
--------------------------
i just want to record the voic from the mic and play it back
|
|
|
|
|
|
Sounds like you have disposed of an object whilst still being used by a class.
Try to run an debugger on it to see what the class is, and from there you can try to find where you dispose the instance.
|
|
|
|
|
Is it possible to declare namespace and class properties in a custom control? I have a control that loads a dropdownlist which referances a classlibrary that in-turn calls a stored procedure (DataLayer). I would like to make this control dynamic so that I can load differant data into the dropdownlist by setting the properties of the control for the namespace, class and method which will retrieve the data and return a dataset to the control to load the dropdownlist.
I.E.
DataSet ds = New DataSet();
CCNameSpaceProperty.CCClassProperty DataLayerRef = CCNameSpaceProperty.CCClassProperty();
ds = DataLayerRef.CCMethodProperty(ds);
Paul Dietz
|
|
|
|
|
Would a better solution be to pass the dataset as a property into the control to load the dropdownlist?
|
|
|
|
|
hi all
i want to place a search button which searches employee details when i give the employee name in the search text box.I am using Grid view for displaying employee details.
please help me to get search button.
thanks in advance
cheers
sangeet
|
|
|
|
|
1: add a field and a button + eventhandler
in the eventhandler do the following:
2: get the data (employee name) out of the field
3: create a sql statement and pass it to the database
4: bind the dataset to the grid
hope this helps
Coulda, woulda, shoulda doesn't matter if you don't.
<marquee>
|
|
|
|
|
Create a button named i.e SearchButton and a textfield for holding the employee name.
Create a button_click event handler much like below:
<code>
private void SearchButton_Click(object sender, System.EventArgs e)
{
//Retrieve the name of the employee to search for
string name = this.textBoxName.Text;
//Searchstatement, much like SQL. I.e search for "Name like 'sangeet'".
//You can also add wildcards '%' to catch different versions of your
//searchtext. I.e 'searchstring = 'ColumnNameHere like '%" + name + "%'";
string searchStatement = "Name like '" + name + "'";
//Sort your hits, descending or ascending
string sorting = "Name DESC";
//Search for a row with matching name in column 'Name'
DataRow []rows = this.ds.Tables["TableNameHere"].Select(searchStatement, sorting);
foreach(DataRow row in rows)
{
for(int i=0; i < row.ItemArray.Length; i++)
{
//Do something with the data in each column of your datarow
Console.WriteLine(row.ItemArray[i].ToString());
}
}
}
</code>
-Larantz-
-- modified at 15:00 Friday 28th April, 2006
|
|
|
|