|
tr_thorn wrote: where is the problem with this query ?
1. You should always use parameters to do this. Don't fall a victim to Sql Injection attacks[^].
2. The dates are not in a format that is being recognised in the server. For instance, if your date is 23/06/07 and your database is running with American format, it won't recognise this as a valid date - even though it is a valid date in the UK. Try passing dates across in UTC format instead.
|
|
|
|
|
My date is 28.11.2007 and Db is saving dates like 28.11.2007:00:00:00 ... when i search it from textboxes
getting "The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value." this error.
Whhats the problem ?
|
|
|
|
|
just to proove Pete is right, try typing into the textbox 2007-11-28 instead of 28.11.2007
I pretty much guarantee it'll work.
|
|
|
|
|
tr_thorn wrote: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value." this error.
Whhats the problem ?
Well, if you solve the SQL Injection Attack problem you automatically solve your date problem too. Long story short: Use parameterised queries!
|
|
|
|
|
tr_thorn wrote: 28.11.2007:00:00:00
Sorry to be picky, but that's not how the database is saving it. It's how it's being displayed which is a completely different issue altogether.
|
|
|
|
|
Pete O`Hanlon wrote: Sorry to be picky
Be picky, it is good information.
|
|
|
|
|
i want to know the code of how to convert the .wav files to byte array using c#.net
help me please.
|
|
|
|
|
Read it into an appropriate stream and then write it out of the stream using the stream ToArray() method.
|
|
|
|
|
If you use ToArray you will put the whole stream in memory. Wave files are notoriously large so it would be much better to incrementally use the bytes from the streams Read method. While I know you know that Satish may not.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
Actually, that's an excellent point. Have yourself a 5 for that sir, and I really should have mentioned that myself. (Kicks self for missing it).
|
|
|
|
|
HELP! confused:
I am very new to c# and am trying to firgure out what the best way to write a dataset (created from xml) to a database table.
Problem is that I will not know the table structure, so need to create the table based on what is in the dataset (table needs to be a copy of the dataset). Once the table is created i'd like to write all the data in the dataset to the table. Once this is done, I may need to repopulate the dataset with new data (same table structure) and append this data to the newly created table in the DB.
To put this in contect I am trying to use a webservice that only sends data back as xml / csv and will only do a date range. So if i ask for the data from 25/01/2007 to 30/01/2007 it will lump all the data together and give me a total for the period. I need it to give me the totals for each day and thus have to call the webservice once for every day in the range. I am currently calling it and getting the first xml file into a dataset, then would like to write that data to a db, and then call it for the next day and append the data to the db.
Any advice welcomed.
Thanks
|
|
|
|
|
Are you still having trouble with this? Doing a google search is always helpful.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi, i have requirement to display the time in seconds. The time should autoupdate on webpage without refreshing the page?
how can we achive this in c# using asp.net(not in windows application)
Thanks in advance
|
|
|
|
|
You have to use JavaScript to do this. There are lots and lots of samples available via google on this.
|
|
|
|
|
It's not possible without using javascript? like timepicker in windows applications?
is there no alternative?
|
|
|
|
|
Satish - Developer wrote: It's not possible without using javascript? l
NO.
Satish - Developer wrote: like timepicker in windows applications?
It's not available in web.
|
|
|
|
|
I suppose you could always use Flash or Silverlight, but these would seem to be a bit of overkill.
|
|
|
|
|
Of them all I highly recommend the javascript solution. Web developers who are afraid of javascript should be dragged outside and shot.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
HI all!
i want to instantiate my application when user double click some folder in windows explorer. how should i accomplish it?
when i will instantiate my application it will check it the folder name has a specific CLSID concatenated in it...and on this basis it will further proceed. so what are suggestions ? because i have no idea how to preceed?
May God help u solv ur problems as well,thx in advance!!
|
|
|
|
|
I'm not sure how you would do that, but as a warning, i have my mouse set up to only uses a single click to open files / folders. So you should be aware that not everyone will double-click to open their folders.
My current favourite word is: PIE!
I have changed my name to my regular internet alias. But don't let the 'Genius' part fool you, you don't know what 'SK' stands for.
-The Undefeated
|
|
|
|
|
Thanks a lot! indeed i was not considering that point. I should better catch event of folder opening in some way coz any body can open the folder in any way even by pressing enter button in key board!!
so any body can help me how to instantiate an application when someone tries to open a folder???
Thanks again..SK
May God help u solv ur problems as well,thx in advance!!
|
|
|
|
|
how to implement multilevel inheritance in c#
Yogesh Pekhale
pekhaleyogesh@gmail.com
|
|
|
|
|
Do you mean where a class is derived from more than one class ? You can't, interfaces are as good as it gets.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
//abstract base class
abstract class base
{
//some abstract method
}
//abstract Derived1 class
abstract class Derived1 : base
{
//
}
class BaseDerived : Derived1
{
}
shall i do the thing?
Yogesh Pekhale
pekhaleyogesh@gmail.com
|
|
|
|
|
Abstract methods in the base class should be overridden in the Derived1 class. And I don't think that you can name the class as base since it is reserved word.
|
|
|
|